diff --git a/_docs/v0.57/api.html b/_docs/v0.57/api.html index 8a214c995f..1163de9b22 100644 --- a/_docs/v0.57/api.html +++ b/_docs/v0.57/api.html @@ -78,30727 +78,9 @@ } - + - + + diff --git a/_docs/v0.57/api.json b/_docs/v0.57/api.json new file mode 100644 index 0000000000..3310900897 --- /dev/null +++ b/_docs/v0.57/api.json @@ -0,0 +1,30738 @@ +{ + "openapi" : "3.1.0", + "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" + }, + "components" : { + "schemas" : { + "gsheets.response" : { + "anyOf" : [ { + "type" : "object", + "properties" : { + "error" : { + "type" : "boolean" + }, + "message" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "error", "message" ] + }, { + "oneOf" : [ { + "type" : "object", + "properties" : { } + }, { + "type" : "object", + "properties" : { + "created_at" : { + "type" : "integer", + "minimum" : 1 + }, + "created_by_id" : { + "type" : "integer", + "minimum" : 1 + }, + "db_id" : { + "type" : "integer", + "minimum" : 1 + }, + "sync_started_at" : { + "type" : "integer", + "minimum" : 1 + }, + "url" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "url", "created_at", "sync_started_at", "created_by_id", "db_id" ] + }, { + "type" : "object", + "properties" : { + "created_at" : { + "type" : "integer", + "minimum" : 1 + }, + "created_by_id" : { + "type" : "integer", + "minimum" : 1 + }, + "db_id" : { + "type" : "integer", + "minimum" : 1 + }, + "last_sync_at" : { + "type" : "integer", + "minimum" : 1 + }, + "next_sync_at" : { + "type" : "integer", + "minimum" : 1 + }, + "url" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "url", "created_at", "last_sync_at", "next_sync_at", "created_by_id", "db_id" ] + }, { + "type" : "object", + "properties" : { + "created_at" : { + "type" : "integer", + "minimum" : 1 + }, + "created_by_id" : { + "type" : "integer", + "minimum" : 1 + }, + "db_id" : { + "type" : "integer", + "minimum" : 1 + }, + "error_message" : { + "type" : "string", + "minLength" : 1 + }, + "url" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "url", "created_at", "error_message", "created_by_id", "db_id" ] + } ] + } ] + }, + "mbql.clause.!=" : { }, + "mbql.clause.*" : { }, + "mbql.clause.+" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.arithmetic.plus-minus-temporal-interval-schema" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.arithmetic.plus-minus-numeric-schema" + } ] + }, + "mbql.clause.-" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.arithmetic.plus-minus-temporal-interval-schema" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.arithmetic.plus-minus-numeric-schema" + }, { + "anyOf" : [ { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.arithmetic.plus-minus-numeric-schema" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.arithmetic.temporal-difference-schema" + } ] + } ] + }, + "mbql.clause./" : { }, + "mbql.clause.<" : { + "type" : "array", + "prefixItems" : [ { + "const" : "<" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" + } ] + }, + "mbql.clause.<=" : { + "type" : "array", + "prefixItems" : [ { + "const" : "<=" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" + } ] + }, + "mbql.clause.=" : { }, + "mbql.clause.>" : { + "type" : "array", + "prefixItems" : [ { + "const" : ">" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" + } ] + }, + "mbql.clause.>=" : { + "type" : "array", + "prefixItems" : [ { + "const" : ">=" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" + } ] + }, + "mbql.clause.abs" : { + "type" : "array", + "prefixItems" : [ { + "const" : "abs" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" + } ] + }, + "mbql.clause.absolute-datetime" : { }, + "mbql.clause.aggregation" : { + "type" : "array", + "prefixItems" : [ { + "const" : "aggregation" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.ref.aggregation-options" + }, { + "type" : "string" + } ] + }, + "mbql.clause.and" : { }, + "mbql.clause.asc" : { + "type" : "array", + "prefixItems" : [ { + "const" : "asc" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" + } ] + }, + "mbql.clause.avg" : { + "type" : "array", + "prefixItems" : [ { + "const" : "avg" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" + } ] + }, + "mbql.clause.between" : { + "type" : "array", + "prefixItems" : [ { + "const" : "between" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" + } ] + }, + "mbql.clause.case" : { }, + "mbql.clause.ceil" : { + "type" : "array", + "prefixItems" : [ { + "const" : "ceil" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" + } ] + }, + "mbql.clause.coalesce" : { }, + "mbql.clause.concat" : { }, + "mbql.clause.contains" : { }, + "mbql.clause.convert-timezone" : { }, + "mbql.clause.count" : { }, + "mbql.clause.count-where" : { + "type" : "array", + "prefixItems" : [ { + "const" : "count-where" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.boolean" + } ] + }, + "mbql.clause.cum-count" : { }, + "mbql.clause.cum-sum" : { + "type" : "array", + "prefixItems" : [ { + "const" : "cum-sum" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" + } ] + }, + "mbql.clause.date" : { + "type" : "array", + "prefixItems" : [ { + "const" : "date" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "anyOf" : [ { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" + } ] + } ] + }, + "mbql.clause.datetime" : { }, + "mbql.clause.datetime-add" : { + "type" : "array", + "prefixItems" : [ { + "const" : "datetime-add" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" + }, { + "type" : "integer" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing..unit.date-time.interval" + } ] + }, + "mbql.clause.datetime-diff" : { + "type" : "array", + "prefixItems" : [ { + "const" : "datetime-diff" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal.datetime-diff-unit" + } ] + }, + "mbql.clause.datetime-subtract" : { + "type" : "array", + "prefixItems" : [ { + "const" : "datetime-subtract" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" + }, { + "type" : "integer" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing..unit.date-time.interval" + } ] + }, + "mbql.clause.day-name" : { + "type" : "array", + "prefixItems" : [ { + "const" : "day-name" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.integer" + } ] + }, + "mbql.clause.desc" : { + "type" : "array", + "prefixItems" : [ { + "const" : "desc" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" + } ] + }, + "mbql.clause.distinct" : { + "type" : "array", + "prefixItems" : [ { + "const" : "distinct" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.aggregation..distinct.arg" + } ] + }, + "mbql.clause.distinct-where" : { + "type" : "array", + "prefixItems" : [ { + "const" : "distinct-where" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.aggregation..distinct.arg" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.boolean" + } ] + }, + "mbql.clause.does-not-contain" : { }, + "mbql.clause.domain" : { + "type" : "array", + "prefixItems" : [ { + "const" : "domain" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" + } ] + }, + "mbql.clause.during" : { + "type" : "array", + "prefixItems" : [ { + "const" : "during" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" + }, { + "anyOf" : [ { + "$ref" : "#/components/schemas/metabase.lib.schema.literal..string.date" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.literal..string.datetime" + } ] + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing..unit.date-time.interval" + } ] + }, + "mbql.clause.ends-with" : { }, + "mbql.clause.exp" : { + "type" : "array", + "prefixItems" : [ { + "const" : "exp" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" + } ] + }, + "mbql.clause.expression" : { + "type" : "array", + "prefixItems" : [ { + "const" : "expression" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.ref..expression.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + } ] + }, + "mbql.clause.field" : { + "allOf" : [ { + "type" : "array", + "prefixItems" : [ { + "const" : "field" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.ref..field.options" + }, { + "anyOf" : [ { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + }, { + "type" : "string" + } ] + } ] + }, { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.lib.schema.ref..field.id" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.ref..field.literal" + } ] + } ] + }, + "mbql.clause.float" : { + "type" : "array", + "prefixItems" : [ { + "const" : "float" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" + } ] + }, + "mbql.clause.floor" : { + "type" : "array", + "prefixItems" : [ { + "const" : "floor" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" + } ] + }, + "mbql.clause.get-day" : { + "type" : "array", + "prefixItems" : [ { + "const" : "get-day" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" + } ] + }, + "mbql.clause.get-day-of-week" : { }, + "mbql.clause.get-hour" : { + "type" : "array", + "prefixItems" : [ { + "const" : "get-hour" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" + } ] + }, + "mbql.clause.get-minute" : { + "type" : "array", + "prefixItems" : [ { + "const" : "get-minute" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" + } ] + }, + "mbql.clause.get-month" : { + "type" : "array", + "prefixItems" : [ { + "const" : "get-month" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" + } ] + }, + "mbql.clause.get-quarter" : { + "type" : "array", + "prefixItems" : [ { + "const" : "get-quarter" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" + } ] + }, + "mbql.clause.get-second" : { + "type" : "array", + "prefixItems" : [ { + "const" : "get-second" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" + } ] + }, + "mbql.clause.get-week" : { }, + "mbql.clause.get-year" : { + "type" : "array", + "prefixItems" : [ { + "const" : "get-year" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" + } ] + }, + "mbql.clause.host" : { + "type" : "array", + "prefixItems" : [ { + "const" : "host" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" + } ] + }, + "mbql.clause.if" : { }, + "mbql.clause.in" : { }, + "mbql.clause.inside" : { + "type" : "array", + "prefixItems" : [ { + "const" : "inside" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" + } ] + }, + "mbql.clause.integer" : { + "type" : "array", + "prefixItems" : [ { + "const" : "integer" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "anyOf" : [ { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" + } ] + } ] + }, + "mbql.clause.interval" : { + "type" : "array", + "prefixItems" : [ { + "const" : "interval" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "type" : "integer" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing..unit.date-time.interval" + } ] + }, + "mbql.clause.is-empty" : { + "type" : "array", + "prefixItems" : [ { + "const" : "is-empty" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.expression" + } ] + }, + "mbql.clause.is-null" : { + "type" : "array", + "prefixItems" : [ { + "const" : "is-null" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.expression" + } ] + }, + "mbql.clause.length" : { + "type" : "array", + "prefixItems" : [ { + "const" : "length" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" + } ] + }, + "mbql.clause.log" : { + "type" : "array", + "prefixItems" : [ { + "const" : "log" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" + } ] + }, + "mbql.clause.lower" : { + "type" : "array", + "prefixItems" : [ { + "const" : "lower" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" + } ] + }, + "mbql.clause.ltrim" : { + "type" : "array", + "prefixItems" : [ { + "const" : "ltrim" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" + } ] + }, + "mbql.clause.max" : { + "type" : "array", + "prefixItems" : [ { + "const" : "max" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" + } ] + }, + "mbql.clause.median" : { + "type" : "array", + "prefixItems" : [ { + "const" : "median" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" + } ] + }, + "mbql.clause.metric" : { + "type" : "array", + "prefixItems" : [ { + "const" : "metric" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.id.card" + } ] + }, + "mbql.clause.min" : { + "type" : "array", + "prefixItems" : [ { + "const" : "min" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" + } ] + }, + "mbql.clause.month-name" : { + "type" : "array", + "prefixItems" : [ { + "const" : "month-name" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.integer" + } ] + }, + "mbql.clause.not" : { + "type" : "array", + "prefixItems" : [ { + "const" : "not" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.boolean" + } ] + }, + "mbql.clause.not-empty" : { + "type" : "array", + "prefixItems" : [ { + "const" : "not-empty" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.expression" + } ] + }, + "mbql.clause.not-in" : { }, + "mbql.clause.not-null" : { + "type" : "array", + "prefixItems" : [ { + "const" : "not-null" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.expression" + } ] + }, + "mbql.clause.now" : { + "type" : "array", + "prefixItems" : [ { + "const" : "now" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + } ] + }, + "mbql.clause.offset" : { + "type" : "array", + "prefixItems" : [ { + "const" : "offset" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.expression" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.window..offset.n" + } ] + }, + "mbql.clause.or" : { }, + "mbql.clause.path" : { + "type" : "array", + "prefixItems" : [ { + "const" : "path" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" + } ] + }, + "mbql.clause.percentile" : { + "type" : "array", + "prefixItems" : [ { + "const" : "percentile" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.aggregation..percentile.percentile" + } ] + }, + "mbql.clause.power" : { + "type" : "array", + "prefixItems" : [ { + "const" : "power" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" + } ] + }, + "mbql.clause.quarter-name" : { + "type" : "array", + "prefixItems" : [ { + "const" : "quarter-name" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.integer" + } ] + }, + "mbql.clause.regex-match-first" : { + "type" : "array", + "prefixItems" : [ { + "const" : "regex-match-first" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" + } ] + }, + "mbql.clause.relative-datetime" : { }, + "mbql.clause.relative-time-interval" : { + "type" : "array", + "prefixItems" : [ { + "const" : "relative-time-interval" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" + }, { + "type" : "integer" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing..unit.date-time.interval" + }, { + "type" : "integer" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing..unit.date-time.interval" + } ] + }, + "mbql.clause.replace" : { + "type" : "array", + "prefixItems" : [ { + "const" : "replace" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" + }, { + "type" : "string" + }, { + "type" : "string" + } ] + }, + "mbql.clause.round" : { + "type" : "array", + "prefixItems" : [ { + "const" : "round" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" + } ] + }, + "mbql.clause.rtrim" : { + "type" : "array", + "prefixItems" : [ { + "const" : "rtrim" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" + } ] + }, + "mbql.clause.segment" : { + "type" : "array", + "prefixItems" : [ { + "const" : "segment" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.id.segment" + } ] + } ] + }, + "mbql.clause.share" : { + "type" : "array", + "prefixItems" : [ { + "const" : "share" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.boolean" + } ] + }, + "mbql.clause.split-part" : { + "type" : "array", + "prefixItems" : [ { + "const" : "split-part" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" + }, { + "type" : "string", + "minLength" : 1 + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.positive-integer-or-numeric-expression" + } ] + }, + "mbql.clause.sqrt" : { + "type" : "array", + "prefixItems" : [ { + "const" : "sqrt" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" + } ] + }, + "mbql.clause.starts-with" : { }, + "mbql.clause.stddev" : { + "type" : "array", + "prefixItems" : [ { + "const" : "stddev" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" + } ] + }, + "mbql.clause.subdomain" : { + "type" : "array", + "prefixItems" : [ { + "const" : "subdomain" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" + } ] + }, + "mbql.clause.substring" : { }, + "mbql.clause.sum" : { + "type" : "array", + "prefixItems" : [ { + "const" : "sum" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" + } ] + }, + "mbql.clause.sum-where" : { + "type" : "array", + "prefixItems" : [ { + "const" : "sum-where" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.boolean" + } ] + }, + "mbql.clause.temporal-extract" : { }, + "mbql.clause.text" : { + "type" : "array", + "prefixItems" : [ { + "const" : "text" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.expression" + } ] + }, + "mbql.clause.time" : { + "type" : "array", + "prefixItems" : [ { + "const" : "time" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" + }, { + "anyOf" : [ { + "const" : "default" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing..unit.time.interval" + } ] + } ] + }, + "mbql.clause.time-interval" : { + "type" : "array", + "prefixItems" : [ { + "const" : "time-interval" + }, { + "default" : { }, + "allOf" : [ { + "description" : "Options for `:time-interval` operator. Note that `:relative-time-interval` does not support these options.", + "type" : "object", + "properties" : { + "lib/uuid" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" + }, + "base-type" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, { + "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" + } ] + }, + "database-type" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, { + "type" : "null" + } ] + }, + "name" : { + "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" + } ] + }, + "include-current" : { + "type" : "boolean" + } + }, + "required" : [ "lib/uuid" ] + }, { } ] + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" + }, { + "oneOf" : [ { + "type" : "string", + "enum" : [ "current", "last", "next" ] + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.integer" + } ] + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing..unit.date-time.interval" + } ] + }, + "mbql.clause.today" : { + "type" : "array", + "prefixItems" : [ { + "const" : "today" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + } ] + }, + "mbql.clause.trim" : { + "type" : "array", + "prefixItems" : [ { + "const" : "trim" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" + } ] + }, + "mbql.clause.upper" : { + "type" : "array", + "prefixItems" : [ { + "const" : "upper" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" + } ] + }, + "mbql.clause.value" : { + "type" : "array", + "prefixItems" : [ { + "const" : "value" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.literal..value.options" + }, { } ] + }, + "mbql.clause.var" : { + "type" : "array", + "prefixItems" : [ { + "const" : "var" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.common.options" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" + } ] + }, + "metabase-enterprise.action-v2.api.api-action-expression" : { + "description" : "A more relaxed version of ::action-expression that can still have opaque identifiers inside inside.", + "type" : "object", + "properties" : { } + }, + "metabase-enterprise.action-v2.api.api-action-id" : { + "description" : "Primitive actions, saved actions, and packed encodings from the picker.", + "anyOf" : [ { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, { + "type" : "string" + } ] + }, + "metabase-enterprise.action-v2.api.api-action-id-or-expression" : { + "description" : "All the various ways of referring to an action with the v2 APIs.", + "anyOf" : [ { + "$ref" : "#/components/schemas/metabase-enterprise.action-v2.api.api-action-id" + }, { + "$ref" : "#/components/schemas/metabase-enterprise.action-v2.api.api-action-expression" + } ] + }, + "metabase-enterprise.dependencies.api.card-body" : { + "description" : "Schema for an instance of a `:model/Card` (everything is optional to support updates).", + "type" : "object", + "properties" : { + "dataset_query" : { + "$ref" : "#/components/schemas/metabase.queries.schema.query" + }, + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.card" + }, + "parameter_mappings" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" + }, + "parameters" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" + }, + "result_metadata" : { + "$ref" : "#/components/schemas/metabase.analyze.query-results.ResultsMetadata" + }, + "type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..card.type" + } + } + }, + "metabase-enterprise.dependencies.api.transform-body" : { + "type" : "object", + "properties" : { + "id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "name" : { + "type" : "string" + }, + "source" : { + "type" : "object", + "properties" : { + "query" : { + "$ref" : "#/components/schemas/metabase.queries.schema.query" + }, + "type" : { + "type" : "string" + } + } + }, + "target" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, + "required" : [ "id" ] + }, + "metabase-enterprise.metabot-v3.client.schema.message" : { + "type" : "object", + "properties" : { + "content" : { + "type" : "string" + }, + "role" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.client.schema.role" + }, + "tool_call_id" : { + "type" : "string" + }, + "tool_calls" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "arguments" : { + "type" : "string" + }, + "id" : { + "type" : "string" + }, + "name" : { + "type" : "string" + } + }, + "required" : [ "id", "name", "arguments" ] + } + } + }, + "required" : [ "role" ] + }, + "metabase-enterprise.metabot-v3.client.schema.messages" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.client.schema.message" + } + }, + "metabase-enterprise.metabot-v3.client.schema.role" : { + "type" : "string", + "enum" : [ "system", "user", "assistant", "tool" ] + }, + "metabase-enterprise.metabot-v3.context.context" : { + "type" : "object", + "additionalProperties" : { } + }, + "metabase-enterprise.metabot-v3.tools.api.aggregation" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "bucket" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.bucket" + }, + "field_id" : { + "type" : "string" + }, + "function" : { + "type" : "string", + "enum" : [ "avg", "count", "count-distinct", "max", "min", "sum" ] + }, + "sort_order" : { + "type" : "string", + "enum" : [ "asc", "desc" ] + } + }, + "required" : [ "field_id", "function" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.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-enterprise.metabot-v3.tools.api.answer-sources-result" : { + "anyOf" : [ { + "type" : "object", + "properties" : { + "structured_output" : { + "type" : "object", + "properties" : { + "metrics" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.full-metric" + } + }, + "models" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.table-result" + } + } + }, + "required" : [ "metrics", "models" ] + } + }, + "required" : [ "structured_output" ] + }, { + "type" : "object", + "properties" : { + "output" : { + "type" : "string" + } + }, + "required" : [ "output" ] + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.basic-metric" : { + "type" : "object", + "properties" : { + "default_time_dimension_field_id" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + }, + "type" : { + "const" : "metric" + } + }, + "required" : [ "id", "type", "name" ] + }, + "metabase-enterprise.metabot-v3.tools.api.basic-snippet" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + } + }, + "required" : [ "id", "name" ] + }, + "metabase-enterprise.metabot-v3.tools.api.basic-transform" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "entity_id" : { + "type" : "string" + }, + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + }, + "source" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.transforms.transform-source" + }, + "type" : { + "type" : "string", + "enum" : [ "mbql", "native", "python" ] + } + }, + "required" : [ "id", "name", "type", "source" ] + }, + "metabase-enterprise.metabot-v3.tools.api.broken-question" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + } + }, + "required" : [ "id", "name" ] + }, + "metabase-enterprise.metabot-v3.tools.api.broken-transform" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + } + }, + "required" : [ "id", "name" ] + }, + "metabase-enterprise.metabot-v3.tools.api.bucket" : { + "type" : "string", + "enum" : [ "millisecond", "second", "minute", "hour", "day", "week", "month", "quarter", "year", "second-of-minute", "minute-of-hour", "hour-of-day", "day-of-week", "day-of-month", "day-of-year", "week-of-year", "month-of-year", "quarter-of-year", "year-of-era" ] + }, + "metabase-enterprise.metabot-v3.tools.api.check-transform-dependencies-arguments" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "source" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.transforms.transform-source" + }, + "transform_id" : { + "type" : "integer" + } + }, + "required" : [ "transform_id", "source" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.check-transform-dependencies-result" : { + "anyOf" : [ { + "type" : "object", + "properties" : { + "structured_output" : { + "type" : "object", + "properties" : { + "bad_question_count" : { + "type" : "integer" + }, + "bad_questions" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.broken-question" + } + }, + "bad_transform_count" : { + "type" : "integer" + }, + "bad_transforms" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.broken-transform" + } + }, + "success" : { + "type" : "boolean" + } + }, + "required" : [ "success", "bad_transform_count", "bad_transforms", "bad_question_count", "bad_questions" ] + } + }, + "required" : [ "structured_output" ] + }, { + "type" : "object", + "properties" : { + "output" : { + "type" : "string" + } + }, + "required" : [ "output" ] + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.column" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "field_id" : { + "type" : "string" + }, + "field_values" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.field-values" + }, + "name" : { + "type" : "string" + }, + "semantic_type" : { + "type" : "string" + }, + "type" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.field-type" + } + }, + "required" : [ "field_id", "name" ] + }, + "metabase-enterprise.metabot-v3.tools.api.columns" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.column" + } + }, + "metabase-enterprise.metabot-v3.tools.api.count" : { + "type" : "integer" + }, + "metabase-enterprise.metabot-v3.tools.api.create-dashboard-subscription-arguments" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "dashboard_id" : { + "type" : "integer" + }, + "email" : { + "type" : "string" + }, + "schedule" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.subscription-schedule" + } + }, + "required" : [ "dashboard_id", "email", "schedule" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.disjunctive-numeric-filter" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "field_id" : { + "type" : "string" + }, + "operation" : { + "type" : "string", + "enum" : [ "equals", "not-equals", "number-equals", "number-not-equals" ] + }, + "values" : { + "type" : "array", + "items" : { + "anyOf" : [ { + "type" : "integer" + }, { + "type" : "number" + } ] + } + } + }, + "required" : [ "field_id", "operation", "values" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.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-enterprise.metabot-v3.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-enterprise.metabot-v3.tools.api.disjunctive-temporal-filter" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "bucket" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.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-enterprise.metabot-v3.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-enterprise.metabot-v3.tools.api.field" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "bucket" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.bucket" + }, + "field_id" : { + "type" : "string" + } + }, + "required" : [ "field_id" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.field-type" : { + "type" : "string", + "enum" : [ "boolean", "date", "datetime", "time", "number", "string" ] + }, + "metabase-enterprise.metabot-v3.tools.api.field-values" : { + "anyOf" : [ { + "type" : "array", + "items" : { + "type" : "boolean" + } + }, { + "type" : "array", + "items" : { + "type" : "number" + } + }, { + "type" : "array", + "items" : { + "type" : "string" + } + } ] + }, + "metabase-enterprise.metabot-v3.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" : { + "type" : "integer" + } + }, + "required" : [ "entity_type", "entity_id", "field_id" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.field-values-result" : { + "anyOf" : [ { + "type" : "object", + "properties" : { + "structured_output" : { + "type" : "object", + "properties" : { + "field_id" : { + "type" : "string" + }, + "statistics" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.statistics" + }, + "values" : { + "type" : "array", + "items" : { } + } + }, + "required" : [ "field_id" ] + } + }, + "required" : [ "structured_output" ] + }, { + "type" : "object", + "properties" : { + "output" : { + "type" : "string" + } + }, + "required" : [ "output" ] + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.filter" : { + "anyOf" : [ { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.existence-filter" + }, { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.temporal-extraction-filter" + }, { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.disjunctive-temporal-extraction-filter" + }, { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.temporal-filter" + }, { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.disjunctive-temporal-filter" + }, { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.string-filter" + }, { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.disjunctive-string-date-filter" + }, { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.numeric-filter" + }, { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.disjunctive-numeric-filter" + } ] + }, + "metabase-enterprise.metabot-v3.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-enterprise.metabot-v3.tools.api.filter" + } + } + }, + "required" : [ "data_source", "filters" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.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-enterprise.metabot-v3.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-enterprise.metabot-v3.tools.api.find-outliers-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" + }, + "result_field_id" : { + "type" : "string" + } + }, + "required" : [ "query", "result_field_id" ] + }, { + "type" : "object", + "properties" : { + "metric_id" : { + "type" : "integer" + } + }, + "required" : [ "metric_id" ] + }, { + "type" : "object", + "properties" : { + "report_id" : { + "type" : "integer" + }, + "result_field_id" : { + "type" : "string" + } + }, + "required" : [ "report_id", "result_field_id" ] + }, { + "type" : "object", + "properties" : { + "result_field_id" : { + "type" : "string" + }, + "table_id" : { + "type" : "string" + } + }, + "required" : [ "table_id", "result_field_id" ] + } ] + }, { + "type" : "object", + "properties" : { } + } ] + } + }, + "required" : [ "data_source" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.find-outliers-result" : { + "anyOf" : [ { + "type" : "object", + "properties" : { + "structured_output" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "dimension" : { }, + "value" : { + "anyOf" : [ { + "type" : "integer" + }, { + "type" : "number" + } ] + } + }, + "required" : [ "dimension", "value" ] + } + } + }, + "required" : [ "structured_output" ] + }, { + "type" : "object", + "properties" : { + "output" : { + "type" : "string" + } + }, + "required" : [ "output" ] + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.full-metric" : { + "type" : "object", + "properties" : { + "default_time_dimension_field_id" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + }, + "queryable_dimensions" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.columns" + }, + "type" : { + "const" : "metric" + }, + "verified" : { + "type" : "boolean" + } + }, + "required" : [ "id", "type", "name" ] + }, + "metabase-enterprise.metabot-v3.tools.api.full-snippet" : { + "type" : "object", + "properties" : { + "content" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + } + }, + "required" : [ "id", "name", "content" ] + }, + "metabase-enterprise.metabot-v3.tools.api.full-transform" : { + "type" : "object", + "properties" : { + "entity_id" : { + "type" : "string" + }, + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + }, + "updated_at" : { + "description" : "value must be a valid date string", + "type" : "string" + }, + "source" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.transforms.transform-source" + }, + "type" : { + "type" : "string", + "enum" : [ "mbql", "native", "python" ] + }, + "target" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.transforms.transform-target" + }, + "created_at" : { + "description" : "value must be a valid date string", + "type" : "string" + }, + "description" : { + "type" : "string" + } + }, + "required" : [ "id", "name", "type", "source", "created_at", "updated_at", "target" ] + }, + "metabase-enterprise.metabot-v3.tools.api.generate-insights-arguments" : { + "type" : "object", + "properties" : { + "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-enterprise.metabot-v3.tools.api.get-current-user-result" : { + "anyOf" : [ { + "type" : "object", + "properties" : { + "structured_output" : { + "type" : "object", + "properties" : { + "email_address" : { + "type" : "string" + }, + "glossary" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + }, + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + }, + "type" : { + "const" : "user" + } + }, + "required" : [ "id", "type", "name", "email_address" ] + } + }, + "required" : [ "structured_output" ] + }, { + "type" : "object", + "properties" : { + "output" : { + "type" : "string" + } + }, + "required" : [ "output" ] + } ] + }, + "metabase-enterprise.metabot-v3.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-enterprise.metabot-v3.tools.api.get-document-details-arguments" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "document_id" : { + "type" : "integer" + } + }, + "required" : [ "document_id" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.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-enterprise.metabot-v3.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" + } + }, + "required" : [ "metric_id" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.get-metric-details-result" : { + "anyOf" : [ { + "type" : "object", + "properties" : { + "structured_output" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.full-metric" + } + }, + "required" : [ "structured_output" ] + }, { + "type" : "object", + "properties" : { + "output" : { + "type" : "string" + } + }, + "required" : [ "output" ] + } ] + }, + "metabase-enterprise.metabot-v3.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-enterprise.metabot-v3.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-enterprise.metabot-v3.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-enterprise.metabot-v3.tools.api.get-report-details-result" : { + "anyOf" : [ { + "type" : "object", + "properties" : { + "structured_output" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + }, + "result_columns" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.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-enterprise.metabot-v3.tools.api.get-snippet-details-arguments" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "snippet_id" : { + "type" : "integer" + } + }, + "required" : [ "snippet_id" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.get-snippet-details-result" : { + "description" : "Schema for SQL snippet detail results", + "type" : "object", + "properties" : { + "structured_output" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.full-snippet" + } + }, + "required" : [ "structured_output" ] + }, + "metabase-enterprise.metabot-v3.tools.api.get-snippets-result" : { + "description" : "Schema for SQL snippet list results", + "type" : "object", + "properties" : { + "structured_output" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.basic-snippet" + } + } + }, + "required" : [ "structured_output" ] + }, + "metabase-enterprise.metabot-v3.tools.api.get-table-details-arguments" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "model_id" : { + "type" : "integer" + }, + "table_id" : { + "anyOf" : [ { + "type" : "integer" + }, { + "type" : "string" + } ] + }, + "with_field_values" : { + "default" : true, + "type" : "boolean" + }, + "with_fields" : { + "default" : true, + "type" : "boolean" + }, + "with_metric_default_temporal_breakout" : { + "default" : true, + "type" : "boolean" + }, + "with_metrics" : { + "default" : true, + "type" : "boolean" + }, + "with_related_tables" : { + "default" : true, + "type" : "boolean" + } + } + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.get-table-details-result" : { + "anyOf" : [ { + "type" : "object", + "properties" : { + "structured_output" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.table-result" + } + }, + "required" : [ "structured_output" ] + }, { + "type" : "object", + "properties" : { + "output" : { + "type" : "string" + } + }, + "required" : [ "output" ] + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.get-tables-arguments" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "database_id" : { + "type" : "integer" + } + }, + "required" : [ "database_id" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.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-enterprise.metabot-v3.tools.api.get-transform-details-arguments" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "transform_id" : { + "type" : "integer" + } + }, + "required" : [ "transform_id" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.get-transform-details-result" : { + "anyOf" : [ { + "type" : "object", + "properties" : { + "structured_output" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.full-transform" + } + } + }, + "required" : [ "structured_output" ] + }, { + "type" : "object", + "properties" : { + "output" : { + "type" : "string" + } + }, + "required" : [ "output" ] + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.get-transform-python-library-details-arguments" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "path" : { + "type" : "string" + } + }, + "required" : [ "path" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.get-transform-python-library-details-result" : { + "anyOf" : [ { + "type" : "object", + "properties" : { + "structured_output" : { + "type" : "object", + "properties" : { + "created_at" : { + "description" : "value must be a valid date string", + "type" : "string" + }, + "path" : { + "type" : "string" + }, + "source" : { + "type" : "string" + }, + "updated_at" : { + "description" : "value must be a valid date string", + "type" : "string" + } + }, + "required" : [ "source", "path", "created_at", "updated_at" ] + } + }, + "required" : [ "structured_output" ] + }, { + "type" : "object", + "properties" : { + "output" : { + "type" : "string" + } + }, + "required" : [ "output" ] + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.get-transforms-result" : { + "anyOf" : [ { + "type" : "object", + "properties" : { + "structured_output" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.basic-transform" + } + } + }, + "required" : [ "structured_output" ] + }, { + "type" : "object", + "properties" : { + "output" : { + "type" : "string" + } + }, + "required" : [ "output" ] + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.group-by" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "field_granularity" : { + "type" : "string", + "enum" : [ "day", "week", "month", "quarter", "year" ] + }, + "field_id" : { + "type" : "string" + } + }, + "required" : [ "field_id" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.numeric-filter" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "field_id" : { + "type" : "string" + }, + "operation" : { + "type" : "string", + "enum" : [ "equals", "not-equals", "greater-than", "greater-than-or-equal", "less-than", "less-than-or-equal", "number-equals", "number-not-equals", "number-greater-than", "number-greater-than-or-equal", "number-less-than", "number-less-than-or-equal" ] + }, + "value" : { + "anyOf" : [ { + "type" : "integer" + }, { + "type" : "number" + } ] + } + }, + "required" : [ "field_id", "operation", "value" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.proportion" : { + "type" : "number" + }, + "metabase-enterprise.metabot-v3.tools.api.query-datasource-arguments" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "aggregations" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.aggregation" + } + }, + "fields" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.field" + } + }, + "filters" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.filter" + } + }, + "group_by" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.group-by" + } + }, + "limit" : { + "type" : "integer" + }, + "model_id" : { + "type" : "integer" + }, + "order_by" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "direction" : { + "type" : "string", + "enum" : [ "asc", "desc" ] + }, + "field" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.field" + } + }, + "required" : [ "field", "direction" ] + } + }, + "table_id" : { + "type" : "integer" + } + } + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.query-metric-arguments" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "filters" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.filter" + } + }, + "group_by" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.group-by" + } + }, + "metric_id" : { + "type" : "integer" + } + }, + "required" : [ "metric_id" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.query-model-arguments" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "aggregations" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.aggregation" + } + }, + "fields" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.field" + } + }, + "filters" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.filter" + } + }, + "group_by" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.group-by" + } + }, + "limit" : { + "type" : "integer" + }, + "model_id" : { + "type" : "integer" + }, + "order_by" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "direction" : { + "type" : "string", + "enum" : [ "asc", "desc" ] + }, + "field" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.field" + } + }, + "required" : [ "field", "direction" ] + } + } + }, + "required" : [ "model_id" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.search-arguments" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "created_at" : { + "type" : "string", + "minLength" : 1 + }, + "database_id" : { + "type" : "integer" + }, + "entity_types" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "table", "model", "question", "dashboard", "metric", "database", "transform" ] + } + }, + "last_edited_at" : { + "type" : "string", + "minLength" : 1 + }, + "limit" : { + "default" : 50, + "type" : "integer" + }, + "search_native_query" : { + "type" : "boolean", + "default" : false + }, + "semantic_queries" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "term_queries" : { + "type" : "array", + "items" : { + "type" : "string" + } + } + } + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.search-result" : { + "anyOf" : [ { + "type" : "object", + "properties" : { + "structured_output" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.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-enterprise.metabot-v3.tools.api.search-result-item" : { + "description" : "Unified schema for search result items.", + "type" : "object", + "properties" : { + "collection" : { + "type" : "object", + "properties" : { + "authority_level" : { + "type" : "string" + }, + "name" : { + "type" : "string" + } + } + }, + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + }, + "verified" : { + "type" : "boolean" + }, + "database_id" : { + "type" : "integer" + }, + "updated_at" : { + "type" : "string" + }, + "display_name" : { + "type" : "string" + }, + "type" : { + "type" : "string", + "enum" : [ "table", "model", "dashboard", "question", "metric", "database", "transform" ] + }, + "database_schema" : { + "type" : "string" + }, + "created_at" : { + "type" : "string" + }, + "description" : { + "type" : "string" + } + }, + "required" : [ "id", "type", "name" ] + }, + "metabase-enterprise.metabot-v3.tools.api.statistics" : { + "type" : "object", + "properties" : { + "values" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.field-values" + }, + "min" : { + "type" : "number" + }, + "percent_url" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.proportion" + }, + "average_length" : { + "type" : "number" + }, + "earliest" : { + "type" : "string" + }, + "q1" : { + "type" : "number" + }, + "max" : { + "type" : "number" + }, + "distinct_count" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.count" + }, + "percent_state" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.proportion" + }, + "percent_null" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.proportion" + }, + "avg" : { + "type" : "number" + }, + "sd" : { + "type" : "number" + }, + "percent_email" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.proportion" + }, + "latest" : { + "type" : "string" + }, + "q3" : { + "type" : "number" + }, + "percent_json" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.proportion" + } + } + }, + "metabase-enterprise.metabot-v3.tools.api.string-filter" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "field_id" : { + "type" : "string" + }, + "operation" : { + "type" : "string", + "enum" : [ "equals", "not-equals", "string-equals", "string-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-enterprise.metabot-v3.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-enterprise.metabot-v3.tools.api.table-result" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + }, + "database_id" : { + "type" : "integer" + }, + "related_tables" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.table-result" + } + }, + "display_name" : { + "type" : "string" + }, + "type" : { + "type" : "string", + "enum" : [ "model", "table" ] + }, + "fields" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.columns" + }, + "database_schema" : { + "type" : "string" + }, + "metrics" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.basic-metric" + } + }, + "description" : { + "type" : "string" + } + }, + "required" : [ "id", "type", "name", "display_name", "database_id", "fields" ] + }, + "metabase-enterprise.metabot-v3.tools.api.temporal-extraction-filter" : { + "allOf" : [ { + "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-enterprise.metabot-v3.tools.api.temporal-filter" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "bucket" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.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", "date-equals", "date-not-equals", "date-before", "date-on-or-before", "date-after", "date-on-or-after" ] + }, + "value" : { + "anyOf" : [ { + "type" : "string" + }, { + "type" : "integer" + } ] + } + }, + "required" : [ "field_id", "operation", "value" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.tool-request" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + }, + "metabase-enterprise.metabot-v3.tools.transforms.transform-source" : { + "$ref" : "#/components/schemas/metabase-enterprise.transforms.api.transform-source" + }, + "metabase-enterprise.metabot-v3.tools.transforms.transform-target" : { + "$ref" : "#/components/schemas/metabase-enterprise.transforms.api.transform-target" + }, + "metabase-enterprise.permission-debug.impl.group-id" : { + "type" : "integer" + }, + "metabase-enterprise.permission-debug.impl.perm-debug-info" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { } + }, + "decision" : { + "type" : "string", + "enum" : [ "allow", "denied", "limited" ] + }, + "message" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "model-id" : { + "type" : "string" + }, + "model-type" : { + "type" : "string", + "enum" : [ "card", "invalid" ] + }, + "segment" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "sandboxed", "impersonated", "routed" ] + }, + "uniqueItems" : true + }, + "suggestions" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + } + }, + "required" : [ "model-type", "model-id", "decision", "segment", "message", "data", "suggestions" ] + }, + "metabase-enterprise.sandbox.schema.attribute-remappings" : { + "type" : "object", + "additionalProperties" : { + "anyOf" : [ { + "type" : "string", + "minLength" : 1 + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.parameter.target" + } ] + }, + "description" : "value must be a valid attribute remappings map (attribute name -> remapped name)", + "optional" : true + }, + "metabase-enterprise.transforms.api.run-trigger" : { + "type" : "string", + "enum" : [ "none", "global-schedule" ] + }, + "metabase-enterprise.transforms.api.transform-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" : "object", + "additionalProperties" : { + "type" : "integer" + } + }, + "type" : { + "const" : "python" + } + }, + "required" : [ "source-tables", "type", "body" ], + "additionalProperties" : false + } ] + }, + "metabase-enterprise.transforms.api.transform-target" : { + "type" : "object", + "properties" : { + "database" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + }, + "schema" : { + "anyOf" : [ { + "type" : "string", + "minLength" : 1 + }, { + "type" : "null" + } ] + }, + "type" : { + "type" : "string", + "enum" : [ "table" ] + } + }, + "required" : [ "type", "name" ] + }, + "metabase.actions.schema..action.for-insert" : { + "description" : "Schema for inserting a new Action (REST API or internally).", + "allOf" : [ { + "type" : "object", + "properties" : { + "archived" : { + "type" : "boolean" + }, + "description" : { + "type" : "string" + }, + "model_id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.card" + }, + "name" : { + "type" : "string" + }, + "parameter_mappings" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" + }, + "parameters" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" + }, + "type" : { + "$ref" : "#/components/schemas/metabase.actions.schema.type" + }, + "visualization_settings" : { + "type" : "object" + } + }, + "required" : [ "name", "type", "model_id" ] + }, { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.actions.schema.http-action" + }, { + "$ref" : "#/components/schemas/metabase.actions.schema.implicit-action" + }, { + "$ref" : "#/components/schemas/metabase.actions.schema.query-action" + }, { + "type" : "object", + "properties" : { } + } ] + } ] + }, + "metabase.actions.schema..action.for-update" : { + "description" : "Schema for updating an Action (REST API or internally).", + "allOf" : [ { + "type" : "object", + "properties" : { + "visualization_settings" : { + "type" : "object" + }, + "parameter_mappings" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" + }, + "id" : { + "$ref" : "#/components/schemas/metabase.actions.schema.id" + }, + "name" : { + "type" : "string" + }, + "archived" : { + "type" : "boolean" + }, + "type" : { + "$ref" : "#/components/schemas/metabase.actions.schema.type" + }, + "model_id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.card" + }, + "parameters" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" + }, + "description" : { + "type" : "string" + } + } + }, { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.actions.schema.http-action" + }, { + "$ref" : "#/components/schemas/metabase.actions.schema.implicit-action" + }, { + "$ref" : "#/components/schemas/metabase.actions.schema.query-action" + }, { + "type" : "object", + "properties" : { } + } ] + } ] + }, + "metabase.actions.schema..http-action.json-query" : { + "description" : "must be a valid json-query, something like '.item.title'", + "type" : "string" + }, + "metabase.actions.schema..http-action.template" : { + "type" : "object", + "properties" : { + "body" : { + "type" : "string" + }, + "headers" : { + "type" : "string" + }, + "method" : { + "type" : "string", + "enum" : [ "GET", "POST", "PUT", "DELETE", "PATCH" ] + }, + "parameters" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" + }, + "url" : { + "type" : "string" + } + }, + "required" : [ "method", "url" ], + "additionalProperties" : false + }, + "metabase.actions.schema..implicit-action.kind" : { + "description" : "Unsupported implicit action kind", + "type" : "string", + "enum" : [ "row/create", "row/update", "row/delete", "bulk/create", "bulk/update", "bulk/delete" ] + }, + "metabase.actions.schema.action" : { + "description" : "An Action as it should appear when we `SELECT` it from the app DB.", + "allOf" : [ { + "type" : "object", + "properties" : { + "visualization_settings" : { + "type" : "object" + }, + "parameter_mappings" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" + }, + "id" : { + "$ref" : "#/components/schemas/metabase.actions.schema.id" + }, + "made_public_by_id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.user" + }, + "name" : { + "type" : "string" + }, + "archived" : { + "type" : "boolean" + }, + "updated_at" : { }, + "type" : { + "$ref" : "#/components/schemas/metabase.actions.schema.type" + }, + "created_at" : { }, + "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}" + }, + "model_id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.card" + }, + "parameters" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" + }, + "creator_id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.user" + }, + "description" : { + "type" : "string" + } + }, + "required" : [ "id" ] + }, { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.actions.schema.http-action" + }, { + "$ref" : "#/components/schemas/metabase.actions.schema.implicit-action" + }, { + "$ref" : "#/components/schemas/metabase.actions.schema.query-action" + }, { + "type" : "object", + "properties" : { } + } ] + } ] + }, + "metabase.actions.schema.http-action" : { + "type" : "object", + "properties" : { + "error_handle" : { + "$ref" : "#/components/schemas/metabase.actions.schema..http-action.json-query" + }, + "response_handle" : { + "$ref" : "#/components/schemas/metabase.actions.schema..http-action.json-query" + }, + "template" : { + "$ref" : "#/components/schemas/metabase.actions.schema..http-action.template" + } + } + }, + "metabase.actions.schema.id" : { + "description" : "Valid Action ID", + "type" : "integer", + "minimum" : 1 + }, + "metabase.actions.schema.implicit-action" : { + "type" : "object", + "properties" : { + "kind" : { + "$ref" : "#/components/schemas/metabase.actions.schema..implicit-action.kind" + } + } + }, + "metabase.actions.schema.query-action" : { + "type" : "object", + "properties" : { + "database_id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.database" + }, + "dataset_query" : { + "$ref" : "#/components/schemas/metabase.queries.schema.query" + } + } + }, + "metabase.actions.schema.type" : { + "description" : "Unsupported action type", + "type" : "string", + "enum" : [ "http", "implicit", "query" ] + }, + "metabase.actions.types..scope.raw" : { + "anyOf" : [ { + "type" : "object", + "properties" : { + "dashboard-id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "dashboard-id" ] + }, { + "type" : "object", + "properties" : { + "dashcard-id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "dashcard-id" ] + }, { + "type" : "object", + "properties" : { + "card-id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "card-id" ] + }, { + "type" : "object", + "properties" : { + "model-id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "model-id" ] + }, { + "type" : "object", + "properties" : { + "table-id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "table-id" ] + }, { + "type" : "object", + "properties" : { + "webhook-id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "webhook-id" ] + }, { + "type" : "object", + "properties" : { + "unknown" : { + "type" : "string", + "enum" : [ "model-action" ] + } + }, + "required" : [ "unknown" ] + } ] + }, + "metabase.analyze.query-results.ResultsMetadata" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.query-processor.schema..result-metadata.column" + }, + "description" : "value must be an array of valid results column metadata maps.", + "optional" : true + }, + "metabase.api-keys.schema..key.masked" : { + "description" : "Masked string like 'mb_1234**********'.", + "allOf" : [ { + "$ref" : "#/components/schemas/metabase.api-keys.schema..key.raw" + }, { + "type" : "string", + "pattern" : "^mb_.*{4}\\*+$" + } ] + }, + "metabase.api-keys.schema..key.raw" : { + "description" : "Unhashed string of the form 'mb_'.", + "type" : "string", + "minLength" : 12, + "maxLength" : 254 + }, + "metabase.api-keys.schema.id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "metabase.api-keys.schema.name" : { + "type" : "string", + "minLength" : 1, + "maxLength" : 254 + }, + "metabase.api-keys.schema.prefix" : { + "description" : "Prefix string of an API Key, suitable for passing around unmasked. This must be unique.", + "type" : "string", + "minLength" : 7, + "maxLength" : 7 + }, + "metabase.cache.api..cache-strategy.base.ee" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "nocache", "ttl", "duration", "schedule" ] + } + }, + "required" : [ "type" ] + }, + "metabase.cache.api..cache-strategy.base.oss" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "nocache", "ttl" ] + } + }, + "required" : [ "type" ] + }, + "metabase.cache.api..cache-strategy.ee" : { + "description" : "Schema for a caching strategy in EE when we have an premium token with `:cache-granular-controls`.", + "allOf" : [ { + "$ref" : "#/components/schemas/metabase.cache.api..cache-strategy.base.ee" + }, { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.cache.api..cache-strategy.nocache" + }, { + "$ref" : "#/components/schemas/metabase.cache.api..cache-strategy.ttl" + }, { + "$ref" : "#/components/schemas/metabase.cache.api..cache-strategy.ee.duration" + }, { + "$ref" : "#/components/schemas/metabase.cache.api..cache-strategy.ee.schedule" + } ] + } ] + }, + "metabase.cache.api..cache-strategy.ee.duration" : { + "type" : "object", + "properties" : { + "duration" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "refresh_automatically" : { + "type" : "boolean" + }, + "type" : { + "const" : "duration" + }, + "unit" : { + "type" : "string", + "enum" : [ "hours", "minutes", "seconds", "days" ] + } + }, + "required" : [ "type", "duration", "unit" ], + "additionalProperties" : false + }, + "metabase.cache.api..cache-strategy.ee.schedule" : { + "type" : "object", + "properties" : { + "refresh_automatically" : { + "type" : "boolean" + }, + "schedule" : { + "$ref" : "#/components/schemas/metabase.util.cron.CronScheduleString" + }, + "type" : { + "const" : "schedule" + } + }, + "required" : [ "type", "schedule" ], + "additionalProperties" : false + }, + "metabase.cache.api..cache-strategy.nocache" : { + "type" : "object", + "properties" : { + "type" : { + "const" : "nocache" + } + }, + "required" : [ "type" ] + }, + "metabase.cache.api..cache-strategy.oss" : { + "description" : "Schema for a caching strategy (OSS)", + "allOf" : [ { + "$ref" : "#/components/schemas/metabase.cache.api..cache-strategy.base.oss" + }, { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.cache.api..cache-strategy.nocache" + }, { + "$ref" : "#/components/schemas/metabase.cache.api..cache-strategy.ttl" + } ] + } ] + }, + "metabase.cache.api..cache-strategy.ttl" : { + "type" : "object", + "properties" : { + "min_duration_ms" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + }, + "multiplier" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "type" : { + "const" : "ttl" + } + }, + "required" : [ "type", "multiplier", "min_duration_ms" ], + "additionalProperties" : false + }, + "metabase.cache.api.cache-strategy" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.cache.api..cache-strategy.ee" + }, { + "$ref" : "#/components/schemas/metabase.cache.api..cache-strategy.oss" + } ] + }, + "metabase.channel.models.channel.Channel" : { + "description" : "Channel schema.", + "type" : "object", + "properties" : { + "active" : { + "type" : "boolean" + }, + "description" : { + "type" : "string" + }, + "details" : { + "type" : "object", + "properties" : { } + }, + "name" : { + "type" : "string" + }, + "type" : { + "type" : "string" + } + }, + "required" : [ "name", "type", "details" ] + }, + "metabase.channel.models.channel.ChannelTemplate" : { + "description" : "Channel Template schema.", + "oneOf" : [ { + "type" : "object", + "properties" : { + "channel_type" : { }, + "details" : { + "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplateEmailDetails" + } + }, + "required" : [ "channel_type", "details" ] + }, { } ] + }, + "metabase.channel.models.channel.ChannelTemplateEmailDetails" : { + "oneOf" : [ { + "type" : "object", + "properties" : { + "path" : { + "type" : "string" + }, + "recipient-type" : { + "enum" : [ "cc", "bcc", "cc", "bcc" ] + }, + "subject" : { + "type" : "string" + }, + "type" : { + "enum" : [ "email/handlebars-resource", "email/handlebars-text", "email/handlebars-resource", "email/handlebars-text" ] + } + }, + "required" : [ "type", "subject", "path" ] + }, { + "type" : "object", + "properties" : { + "body" : { + "type" : "string" + }, + "recipient-type" : { + "enum" : [ "cc", "bcc", "cc", "bcc" ] + }, + "subject" : { + "type" : "string" + }, + "type" : { + "enum" : [ "email/handlebars-resource", "email/handlebars-text", "email/handlebars-resource", "email/handlebars-text" ] + } + }, + "required" : [ "type", "subject", "body" ] + } ] + }, + "metabase.collections.api.DashboardQuestionCandidate" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "id" : { + "type" : "integer", + "minimum" : 1 + }, + "name" : { + "type" : "string" + }, + "sole_dashboard_info" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "id" : { + "type" : "integer", + "minimum" : 1 + }, + "name" : { + "type" : "string" + } + }, + "required" : [ "id", "name" ] + } + }, + "required" : [ "id", "name", "sole_dashboard_info" ] + }, + "metabase.collections.api.DashboardQuestionCandidatesResponse" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.collections.api.DashboardQuestionCandidate" + } + }, + "total" : { + "type" : "integer" + } + }, + "required" : [ "data", "total" ] + }, + "metabase.collections.api.MoveDashboardQuestionCandidatesResponse" : { + "type" : "object", + "properties" : { + "moved" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + } + }, + "required" : [ "moved" ] + }, + "metabase.legacy-mbql.schema.!=" : { + "description" : "schema for a valid MBQL 4 :!= clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.*" : { + "description" : "schema for a valid MBQL 4 :* clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.+" : { + "description" : "schema for a valid MBQL 4 :+ clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.-" : { + "description" : "schema for a valid MBQL 4 :- clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema..NativeQuery.Common" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "collection" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "template-tags" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTagMap" + } + } + }, { + "allOf" : [ ] + } ] + }, + "metabase.legacy-mbql.schema..TemplateTag.Common" : { + "description" : "Things required by all template tag types.", + "type" : "object", + "properties" : { + "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" : { + "type" : "object", + "additionalProperties" : { }, + "description" : "optional map to be appended to filter clause" + }, + "dimension" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field" + }, + "default" : { }, + "widget-type" : { + "default" : "category", + "description" : "which type of widget the frontend should show for this Field Filter; this also affects which parameter types\n are allowed to be specified for it.", + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.WidgetType" + } + }, + "required" : [ "type", "name", "display-name", "dimension", "widget-type" ] + }, + "metabase.legacy-mbql.schema..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.SourceQuery" : { + "description" : "Things required by all template tag types.", + "type" : "object", + "properties" : { + "card-id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.card" + }, + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" + }, + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "type" : { + "const" : "card" + } + }, + "required" : [ "type", "name", "display-name", "card-id" ] + }, + "metabase.legacy-mbql.schema..TemplateTag.TemporalUnit" : { + "description" : "Things required by all template tag types.", + "type" : "object", + "properties" : { + "alias" : { + "type" : "string" + }, + "default" : { }, + "dimension" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field" + }, + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" + }, + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "required" : { + "type" : "boolean" + }, + "type" : { + "const" : "temporal-unit" + } + }, + "required" : [ "type", "name", "display-name", "dimension" ] + }, + "metabase.legacy-mbql.schema..TemplateTag.Value.Common" : { + "description" : "Things required by all template tag types.", + "type" : "object", + "properties" : { + "default" : { }, + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" + }, + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "required" : { + "type" : "boolean" + }, + "type" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTagType" + } + }, + "required" : [ "type", "name", "display-name" ] + }, + "metabase.legacy-mbql.schema..legacy-column-metadata.binning-info" : { + "type" : "object", + "properties" : { + "bin_width" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width" + }, + "binning_strategy" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" + }, + "num_bins" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.num-bins" + }, + "strategy" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" + } + }, + "required" : [ "strategy" ] + }, + "metabase.legacy-mbql.schema..legacy-column-metadata.qualified-keys" : { + "type" : "object", + "properties" : { + "lib/external-remap" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.external" + }, + "lib/source-column-alias" : { + "description" : "Name for a column as returned/projected by the previous stage of the query or source Table/source Card. The\n left-hand side (LHS) of\n\n SELECT lhs AS rhs", + "type" : "string" + }, + "lib/type" : { + "default" : "metadata/column", + "const" : "metadata/column" + }, + "lib/source-uuid" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" + }, + "qp/implicit-field?" : { + "type" : "boolean" + }, + "lib/ref-name" : { + "type" : "string" + }, + "lib/deduplicated-name" : { + "type" : "string", + "description" : "The simply-deduplicated name that was historically used in QP results metadata (originally calculated by\n the [[metabase.query-processor.middleware.annotate]] middleware, now calculated\n by [[metabase.lib.middleware.result-metadata]]). This just adds suffixes to column names e.g. `ID` and `ID` become\n `ID` and `ID_2`, respectively. Kept around because many old field refs use this column name." + }, + "lib/original-expression-name" : { + "type" : "string", + "minLength" : 1 + }, + "lib/card-id" : { + "description" : "Valid Card ID", + "type" : "integer", + "minimum" : 1 + }, + "lib/expression-name" : { + "type" : "string", + "minLength" : 1 + }, + "lib/breakout?" : { + "type" : "boolean" + }, + "metabase.lib.field/temporal-unit" : { + "type" : "string", + "enum" : [ "day", "day-of-month", "day-of-week", "day-of-year", "default", "hour", "hour-of-day", "millisecond", "minute", "minute-of-hour", "month", "month-of-year", "quarter", "quarter-of-year", "second", "second-of-minute", "week", "week-of-year", "year", "year-of-era" ] + }, + "metabase.lib.field/binning" : { + "description" : "Schema for `:binning` options passed to a `:field` clause.", + "allOf" : [ { + "type" : "object", + "properties" : { + "strategy" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" + } + }, + "required" : [ "strategy" ] + }, { + "oneOf" : [ { + "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" ] + } ] + } ] + }, + "lib/model-display-name" : { + "type" : "string" + }, + "lib/internal-remap" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.internal" + }, + "metabase.lib.join/join-alias" : { + "type" : "string", + "minLength" : 1 + }, + "lib/original-binning" : { + "description" : "Schema for `:binning` options passed to a `:field` clause.", + "allOf" : [ { + "type" : "object", + "properties" : { + "strategy" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" + } + }, + "required" : [ "strategy" ] + }, { + "oneOf" : [ { + "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" ] + } ] + } ] + }, + "lib/original-join-alias" : { + "type" : "string", + "minLength" : 1 + }, + "lib/original-display-name" : { + "type" : "string" + }, + "lib/source" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.source" + }, + "lib/ref-display-name" : { + "type" : "string" + }, + "lib/original-name" : { + "type" : "string", + "description" : "The original name of the column as it appeared in the very first place it came from (i.e., the physical name of the\n column in the table it appears in). This should be the same as the `:lib/source-column-alias` for the very first\n usage of the column.\n Allowed to be blank because some databases like SQL Server allow blank column names." + }, + "lib/desired-column-alias" : { + "description" : "Name we should use as a column alias for a column in this stage of a query. The desired column alias in stage N\n becomes the source column alias in stage N+1. The right-hand side (RHS) in\n\n SELECT lhs AS rhs", + "type" : "string" + } + } + }, + "metabase.legacy-mbql.schema./" : { + "description" : "schema for a valid MBQL 4 :/ clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.<" : { + "description" : "schema for a valid MBQL 4 :< clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.<=" : { + "description" : "schema for a valid MBQL 4 :<= clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.=" : { + "description" : "schema for a valid MBQL 4 := clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.>" : { + "description" : "schema for a valid MBQL 4 :> clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.>=" : { + "description" : "schema for a valid MBQL 4 :>= clause", + "allOf" : [ ] + }, + "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.", + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.aggregation-options" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.UnnamedAggregation" + } ] + }, + "metabase.legacy-mbql.schema.AggregationOptionsOptions" : { + "description" : "Additional options for any aggregation clause when wrapping it in `:aggregation-options`.", + "type" : "object", + "properties" : { + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + } + } + }, + "metabase.legacy-mbql.schema.Aggregations" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Aggregation" + }, + "minItems" : 1 + }, + "metabase.legacy-mbql.schema.ArithmeticDateTimeUnit" : { + "type" : "string", + "enum" : [ "millisecond", "second", "minute", "hour", "day", "week", "month", "quarter", "year" ] + }, + "metabase.legacy-mbql.schema.BooleanExpression" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.and" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.or" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.not" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.=" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.!=" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.<" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.>" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.<=" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.>=" + }, { + "$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.+" + }, { + "$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" + } ] + }, + "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" : { + "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" + } ], + "description" : "Schema for things that make sense in a `=` or `!=` filter, i.e. things that can be compared for equality.", + "optional" : true + }, + "metabase.legacy-mbql.schema.EqualityFilterFieldArg" : { + "description" : "Schema for the first arg to `=`, `!=`, and friends.", + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.EqualityComparable" + }, + "metabase.legacy-mbql.schema.ExpressionArg" : { + "oneOf" : [ { + "type" : "number" + }, { + "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" + }, { + "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.ExpressionRefOptions" : { + "description" : "Options for a legacy `:expression` ref in MBQL 4 are the same as in MBQL 5, except that `:lib/uuid` is optional and\n it cannot be empty.", + "default" : { }, + "type" : "object", + "properties" : { + "base-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "database-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "effective-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "lib/uuid" : { + "type" : "string", + "minLength" : 36, + "maxLength" : 36 + }, + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "semantic-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" + }, + "temporal-unit" : { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" + } + } + }, + "metabase.legacy-mbql.schema.Expressions" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionDef" + } + }, + "metabase.legacy-mbql.schema.ExtractWeekMode" : { + "description" : "Valid modes to extract weeks.", + "type" : "string", + "enum" : [ "iso", "us", "instance" ] + }, + "metabase.legacy-mbql.schema.FieldOrExpressionDef" : { + "description" : "Schema for anything that is accepted as a top-level expression definition, either an arithmetic expression such as a\n `:+` clause or a `:field` or `:value` clause.", + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.NumericExpression" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.StringExpression" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.BooleanExpression" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.DatetimeExpression" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.case" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.if" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.offset" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.value" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef" + } ] + }, + "metabase.legacy-mbql.schema.FieldOrExpressionRef" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.expression" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field" + } ] + }, + "metabase.legacy-mbql.schema.FieldOrExpressionRefOrRelativeDatetime" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.relative-datetime" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef" + } ] + }, + "metabase.legacy-mbql.schema.FieldRefOptions" : { + "default" : { }, + "type" : "object", + "properties" : { + "binning" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning" + }, + "inherited-temporal-unit" : { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" + }, + "database-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "metabase.lib.field/original-temporal-unit" : { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" + }, + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "source-field-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "effective-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "base-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "lib/uuid" : { + "type" : "string", + "minLength" : 36, + "maxLength" : 36 + }, + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "metabase.lib.field/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" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" + } + }, + "description" : "Options for an MBQL 4 `:field` ref are the same as MBQL 5, except that `:lib/uuid` is not required and it cannot be\n empty.", + "optional" : true + }, + "metabase.legacy-mbql.schema.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.", + "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.segment" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef" + } ] + }, + "metabase.legacy-mbql.schema.IntGreaterThanZeroOrNumericExpression" : { + "oneOf" : [ { + "type" : "integer", + "minimum" : 1 + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.NumericExpression" + } ] + }, + "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\"}]", + "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 [:= [:field {:join-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" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field", + "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." + }, + "source-metadata" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.legacy-column-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." + }, + "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" + }, + "source-metadata" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.legacy-column-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." + }, + "source-query" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.SourceQuery" + }, + "limit" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.int-greater-than-or-equal-to-zero" + }, + "filter" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Filter" + }, + "joins" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Joins" + }, + "aggregation" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Aggregations" + }, + "fields" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Fields" + }, + "source-table" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.SourceTable" + }, + "order-by" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.OrderBys" + }, + "page" : { + "$ref" : "#/components/schemas/metabase.lib.schema.page" + }, + "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" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "query" : { }, + "template-tags" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTagMap" + } + }, + "required" : [ "query" ] + }, { + "allOf" : [ ] + } ] + }, + "metabase.legacy-mbql.schema.NativeSourceQuery" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "collection" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "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.+" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.-" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.~1" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.*" + }, { + "$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.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" : { + "$ref" : "#/components/schemas/metabase.lib.schema.actions.row" + }, + "settings" : { + "$ref" : "#/components/schemas/metabase.lib.schema.settings.settings" + }, + "constraints" : { + "$ref" : "#/components/schemas/metabase.lib.schema.constraints.constraints" + }, + "query" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.MBQLQuery" + }, + "native" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.NativeQuery" + }, + "info" : { + "$ref" : "#/components/schemas/metabase.lib.schema.info.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." + }, + "middleware" : { + "$ref" : "#/components/schemas/metabase.lib.schema.middleware-options.middleware-options" + }, + "database" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.DatabaseID" + }, + "type" : { + "description" : "Type of query. `:query` = MBQL; `:native` = native.", + "type" : "string", + "enum" : [ "query", "native" ] + }, + "parameters" : { + "$ref" : "#/components/schemas/metabase.lib.schema.parameter.parameters" + }, + "create-row" : { + "$ref" : "#/components/schemas/metabase.lib.schema.actions.row" + } + }, + "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__` 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" + } ] + }, + "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.StringFilterOptions" : { + "type" : "object", + "properties" : { + "case-sensitive" : { + "type" : "boolean" + } + } + }, + "metabase.legacy-mbql.schema.TemplateTag" : { + "description" : "Schema for a template tag as specified in a native query. There are four types of template tags, differentiated by\n `:type`.\n\n Template tags are used to specify {{placeholders}} in native queries that are replaced with some sort of value when\n the query itself runs. There are four basic types of template tag for native queries:\n\n 1. Field filters, which are used like\n\n SELECT * FROM table WHERE {{field_filter}}\n\n These reference specific Fields and are replaced with entire conditions, e.g. `some_field > 1000`\n\n 2. Raw values, which are used like\n\n SELECT * FROM table WHERE my_field = {{x}}\n\n These are replaced with raw values.\n\n 3. Native query snippets, which might be used like\n\n SELECT * FROM ({{snippet: orders}}) source\n\n These are replaced with `NativeQuerySnippet`s from the application database.\n\n 4. Source query Card IDs, which are used like\n\n SELECT * FROM ({{#123}}) source\n\n These are replaced with the query from the Card with that ID.\n\n Field filters and raw values usually have their value specified by `:parameters`.", + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..TemplateTag.FieldFilter" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..TemplateTag.Snippet" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..TemplateTag.SourceQuery" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..TemplateTag.TemporalUnit" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..TemplateTag.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" ] + }, + "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" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.NumericExpression" + }, { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.aggregation" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.avg" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.cum-sum" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.distinct" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.distinct-where" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.stddev" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.sum" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.min" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.max" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.metric" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.share" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.count-where" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.sum-where" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.case" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.if" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.median" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.percentile" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.var" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.cum-count" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.count" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.offset" + } ] + } ] + }, + "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" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "database_type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "semantic_type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" + }, + "unit" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.DateTimeUnit" + } + } + }, + "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.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" : [ ] + }, { + "description" : "schema for a valid MBQL 4 :absolute-datetime clause", + "allOf" : [ ] + } ] + }, + "metabase.legacy-mbql.schema.aggregation" : { + "description" : "schema for a valid MBQL 4 :aggregation clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.aggregation-options" : { + "description" : "schema for a valid MBQL 4 :aggregation-options clause", + "allOf" : [ ] + }, + "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" : [ ] + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Filter" + } ] + }, + "metabase.legacy-mbql.schema.asc" : { + "description" : "schema for a valid MBQL 4 :asc clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.avg" : { + "description" : "schema for a valid MBQL 4 :avg 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.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.", + "anyOf" : [ { + "description" : "schema for a valid MBQL 4 :contains clause", + "allOf" : [ ] + }, { + "description" : "schema for a valid MBQL 4 :contains clause", + "allOf" : [ ] + } ] + }, + "metabase.legacy-mbql.schema.convert-timezone" : { + "description" : "schema for a valid MBQL 4 :convert-timezone clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.count" : { + "description" : "schema for a valid MBQL 4 :count clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.count-where" : { + "description" : "schema for a valid MBQL 4 :count-where clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.cum-count" : { + "description" : "schema for a valid MBQL 4 :cum-count clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.cum-sum" : { + "description" : "schema for a valid MBQL 4 :cum-sum 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.legacy-mbql.schema.day-name" : { + "description" : "schema for a valid MBQL 4 :day-name clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.desc" : { + "description" : "schema for a valid MBQL 4 :desc clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.distinct" : { + "description" : "schema for a valid MBQL 4 :distinct clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.distinct-where" : { + "description" : "schema for a valid MBQL 4 :distinct-where clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.does-not-contain" : { + "description" : "Schema for a valid MBQL 4 :metabase.legacy-mbql.schema/does-not-contain clause.", + "anyOf" : [ { + "description" : "schema for a valid MBQL 4 :does-not-contain clause", + "allOf" : [ ] + }, { + "description" : "schema for a valid MBQL 4 :does-not-contain clause", + "allOf" : [ ] + } ] + }, + "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" : [ ] + }, { + "description" : "schema for a valid MBQL 4 :ends-with clause", + "allOf" : [ ] + } ] + }, + "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" : [ ] + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.require-base-type-for-field-name" + } ] + }, + "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.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.legacy-mbql.schema.integer" : { + "description" : "schema for a valid MBQL 4 :integer clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.interval" : { + "description" : "schema for a valid MBQL 4 :interval clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.is-empty" : { + "description" : "schema for a valid MBQL 4 :is-empty clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.is-null" : { + "description" : "schema for a valid MBQL 4 :is-null clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.legacy-column-metadata" : { + "description" : "Schema for a single legacy metadata column. This is the pre-Lib equivalent of\n `:metabase.lib.schema.metadata/column`.", + "allOf" : [ { + "type" : "object", + "properties" : { + "field_ref" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Reference" + }, + "lib/external-remap" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.external" + }, + "lib/source-column-alias" : { + "description" : "Name for a column as returned/projected by the previous stage of the query or source Table/source Card. The\n left-hand side (LHS) of\n\n SELECT lhs AS rhs", + "type" : "string" + }, + "lib/type" : { + "default" : "metadata/column", + "const" : "metadata/column" + }, + "fingerprint" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.fingerprint" + }, + "visibility_type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.visibility-type" + }, + "base_type" : { + "default" : "type/*", + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "lib/source-uuid" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" + }, + "qp/implicit-field?" : { + "type" : "boolean" + }, + "lib/ref-name" : { + "type" : "string" + }, + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + }, + "lib/deduplicated-name" : { + "type" : "string", + "description" : "The simply-deduplicated name that was historically used in QP results metadata (originally calculated by\n the [[metabase.query-processor.middleware.annotate]] middleware, now calculated\n by [[metabase.lib.middleware.result-metadata]]). This just adds suffixes to column names e.g. `ID` and `ID` become\n `ID` and `ID_2`, respectively. Kept around because many old field refs use this column name." + }, + "lib/original-expression-name" : { + "type" : "string", + "minLength" : 1 + }, + "name" : { + "type" : "string" + }, + "lib/card-id" : { + "description" : "Valid Card ID", + "type" : "integer", + "minimum" : 1 + }, + "lib/expression-name" : { + "type" : "string", + "minLength" : 1 + }, + "lib/breakout?" : { + "type" : "boolean" + }, + "metabase.lib.field/temporal-unit" : { + "type" : "string", + "enum" : [ "day", "day-of-month", "day-of-week", "day-of-year", "default", "hour", "hour-of-day", "millisecond", "minute", "minute-of-hour", "month", "month-of-year", "quarter", "quarter-of-year", "second", "second-of-minute", "week", "week-of-year", "year", "year-of-era" ] + }, + "metabase.lib.field/binning" : { + "description" : "Schema for `:binning` options passed to a `:field` clause.", + "allOf" : [ { + "type" : "object", + "properties" : { + "strategy" : { + "$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" ] + } ] + } ] + }, + "semantic_type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" + }, + "display_name" : { + "type" : "string" + }, + "lib/model-display-name" : { + "type" : "string" + }, + "lib/internal-remap" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.internal" + }, + "converted_timezone" : { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal.timezone-id" + }, + "source" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.legacy-source" + }, + "metabase.lib.join/join-alias" : { + "type" : "string", + "minLength" : 1 + }, + "binning_info" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..legacy-column-metadata.binning-info" + }, + "lib/original-binning" : { + "description" : "Schema for `:binning` options passed to a `:field` clause.", + "allOf" : [ { + "type" : "object", + "properties" : { + "strategy" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" + } + }, + "required" : [ "strategy" ] + }, { + "oneOf" : [ { + "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" ] + } ] + } ] + }, + "effective_type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "lib/original-join-alias" : { + "type" : "string", + "minLength" : 1 + }, + "lib/original-display-name" : { + "type" : "string" + }, + "unit" : { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" + }, + "lib/source" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.source" + }, + "lib/ref-display-name" : { + "type" : "string" + }, + "lib/original-name" : { + "type" : "string", + "description" : "The original name of the column as it appeared in the very first place it came from (i.e., the physical name of the\n column in the table it appears in). This should be the same as the `:lib/source-column-alias` for the very first\n usage of the column.\n Allowed to be blank because some databases like SQL Server allow blank column names." + }, + "description" : { + "type" : "string" + }, + "lib/desired-column-alias" : { + "description" : "Name we should use as a column alias for a column in this stage of a query. The desired column alias in stage N\n becomes the source column alias in stage N+1. The right-hand side (RHS) in\n\n SELECT lhs AS rhs", + "type" : "string" + } + }, + "required" : [ "base_type", "display_name", "name" ] + }, { + "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.max" : { + "description" : "schema for a valid MBQL 4 :max clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.median" : { + "description" : "schema for a valid MBQL 4 :median clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.metric" : { + "description" : "schema for a valid MBQL 4 :metric clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.min" : { + "description" : "schema for a valid MBQL 4 :min clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.month-name" : { + "description" : "schema for a valid MBQL 4 :month-name clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.not" : { + "description" : "schema for a valid MBQL 4 :not clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.not-empty" : { + "description" : "schema for a valid MBQL 4 :not-empty clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.not-in" : { + "description" : "schema for a valid MBQL 4 :not-in clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.not-null" : { + "description" : "schema for a valid MBQL 4 :not-null clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.now" : { + "description" : "schema for a valid MBQL 4 :now clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.offset" : { + "description" : "schema for a valid MBQL 4 :offset clause", + "allOf" : [ ] + }, + "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.percentile" : { + "description" : "schema for a valid MBQL 4 :percentile 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.share" : { + "description" : "schema for a valid MBQL 4 :share 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.stddev" : { + "description" : "schema for a valid MBQL 4 :stddev 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.sum" : { + "description" : "schema for a valid MBQL 4 :sum clause", + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.sum-where" : { + "description" : "schema for a valid MBQL 4 :sum-where 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.legacy-mbql.schema.var" : { + "description" : "schema for a valid MBQL 4 :var clause", + "allOf" : [ ] + }, + "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..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..stage.initial" : { + "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" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.int-greater-than-or-equal-to-zero" + }, + "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" + }, { + "allOf" : [ ] + } ] + }, + "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" : { + "type" : "array", + "items" : { + "anyOf" : [ { + "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal" + }, { } ] + } + }, + "query-permissions/referenced-card-ids" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.card" + }, + "uniqueItems" : true + }, + "template-tags" : { + "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.template-tag-map" + } + }, + "required" : [ "lib/type" ] + }, { + "allOf" : [ ] + } ] + }, + "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.aggregation.aggregations" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.aggregation.aggregation" + }, + "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" ] + }, { + "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.int-greater-than-or-equal-to-zero" : { + "description" : "Schema representing an integer than must also be greater than or equal to zero.", + "type" : "integer", + "minimum" : 0 + }, + "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" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "database-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "effective-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "lib/uuid" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" + }, + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "semantic-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" + } + }, + "required" : [ "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", + "$ref" : "#/components/schemas/metabase.lib.schema.common.int-greater-than-or-equal-to-zero" + }, + "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`.", + "$ref" : "#/components/schemas/metabase.lib.schema.common.int-greater-than-or-equal-to-zero" + } + } + }, + "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" : [ { + "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal" + } ], + "optional" : true + }, + "metabase.lib.schema.expression.expression" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal" + } ], + "optional" : true + }, + "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" + } ] + }, + "metabase.lib.schema.expression.number" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal" + } ] + }, + "metabase.lib.schema.expression.orderable" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal" + } ] + }, + "metabase.lib.schema.expression.positive-integer-or-numeric-expression" : { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.integer" + }, + "metabase.lib.schema.expression.string" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal" + } ] + }, + "metabase.lib.schema.expression.temporal" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal" + } ] + }, + "metabase.lib.schema.expression.temporal..absolute-datetime.base-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "metabase.lib.schema.expression.temporal..absolute-datetime.options" : { + "default" : { }, + "type" : "object", + "properties" : { + "base-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "database-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "effective-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "lib/uuid" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" + }, + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "semantic-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" + } + }, + "required" : [ "lib/uuid" ] + }, + "metabase.lib.schema.expression.temporal..relative-datetime.amount" : { + "oneOf" : [ { + "const" : "current" + }, { + "type" : "integer" + } ] + }, + "metabase.lib.schema.expression.temporal..relative-datetime.unit" : { + "anyOf" : [ { + "const" : "default" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing..unit.date-time.interval" + } ] + }, + "metabase.lib.schema.expression.temporal..temporal-extract.unit" : { + "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.lib.schema.expression.temporal.datetime-diff-unit" : { + "type" : "string", + "enum" : [ "day", "week", "month", "quarter", "year", "second", "minute", "hour" ] + }, + "metabase.lib.schema.expression.temporal.timezone-id" : { + "allOf" : [ { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, { + "anyOf" : [ { + "type" : "string", + "enum" : [ "Africa/Abidjan", "Africa/Accra", "Africa/Addis_Ababa", "Africa/Algiers", "Africa/Asmara", "Africa/Asmera", "Africa/Bamako", "Africa/Bangui", "Africa/Banjul", "Africa/Bissau", "Africa/Blantyre", "Africa/Brazzaville", "Africa/Bujumbura", "Africa/Cairo", "Africa/Casablanca", "Africa/Ceuta", "Africa/Conakry", "Africa/Dakar", "Africa/Dar_es_Salaam", "Africa/Djibouti", "Africa/Douala", "Africa/El_Aaiun", "Africa/Freetown", "Africa/Gaborone", "Africa/Harare", "Africa/Johannesburg", "Africa/Juba", "Africa/Kampala", "Africa/Khartoum", "Africa/Kigali", "Africa/Kinshasa", "Africa/Lagos", "Africa/Libreville", "Africa/Lome", "Africa/Luanda", "Africa/Lubumbashi", "Africa/Lusaka", "Africa/Malabo", "Africa/Maputo", "Africa/Maseru", "Africa/Mbabane", "Africa/Mogadishu", "Africa/Monrovia", "Africa/Nairobi", "Africa/Ndjamena", "Africa/Niamey", "Africa/Nouakchott", "Africa/Ouagadougou", "Africa/Porto-Novo", "Africa/Sao_Tome", "Africa/Timbuktu", "Africa/Tripoli", "Africa/Tunis", "Africa/Windhoek", "America/Adak", "America/Anchorage", "America/Anguilla", "America/Antigua", "America/Araguaina", "America/Argentina/Buenos_Aires", "America/Argentina/Catamarca", "America/Argentina/ComodRivadavia", "America/Argentina/Cordoba", "America/Argentina/Jujuy", "America/Argentina/La_Rioja", "America/Argentina/Mendoza", "America/Argentina/Rio_Gallegos", "America/Argentina/Salta", "America/Argentina/San_Juan", "America/Argentina/San_Luis", "America/Argentina/Tucuman", "America/Argentina/Ushuaia", "America/Aruba", "America/Asuncion", "America/Atikokan", "America/Atka", "America/Bahia", "America/Bahia_Banderas", "America/Barbados", "America/Belem", "America/Belize", "America/Blanc-Sablon", "America/Boa_Vista", "America/Bogota", "America/Boise", "America/Buenos_Aires", "America/Cambridge_Bay", "America/Campo_Grande", "America/Cancun", "America/Caracas", "America/Catamarca", "America/Cayenne", "America/Cayman", "America/Chicago", "America/Chihuahua", "America/Ciudad_Juarez", "America/Coral_Harbour", "America/Cordoba", "America/Costa_Rica", "America/Coyhaique", "America/Creston", "America/Cuiaba", "America/Curacao", "America/Danmarkshavn", "America/Dawson", "America/Dawson_Creek", "America/Denver", "America/Detroit", "America/Dominica", "America/Edmonton", "America/Eirunepe", "America/El_Salvador", "America/Ensenada", "America/Fort_Nelson", "America/Fort_Wayne", "America/Fortaleza", "America/Glace_Bay", "America/Godthab", "America/Goose_Bay", "America/Grand_Turk", "America/Grenada", "America/Guadeloupe", "America/Guatemala", "America/Guayaquil", "America/Guyana", "America/Halifax", "America/Havana", "America/Hermosillo", "America/Indiana/Indianapolis", "America/Indiana/Knox", "America/Indiana/Marengo", "America/Indiana/Petersburg", "America/Indiana/Tell_City", "America/Indiana/Vevay", "America/Indiana/Vincennes", "America/Indiana/Winamac", "America/Indianapolis", "America/Inuvik", "America/Iqaluit", "America/Jamaica", "America/Jujuy", "America/Juneau", "America/Kentucky/Louisville", "America/Kentucky/Monticello", "America/Knox_IN", "America/Kralendijk", "America/La_Paz", "America/Lima", "America/Los_Angeles", "America/Louisville", "America/Lower_Princes", "America/Maceio", "America/Managua", "America/Manaus", "America/Marigot", "America/Martinique", "America/Matamoros", "America/Mazatlan", "America/Mendoza", "America/Menominee", "America/Merida", "America/Metlakatla", "America/Mexico_City", "America/Miquelon", "America/Moncton", "America/Monterrey", "America/Montevideo", "America/Montreal", "America/Montserrat", "America/Nassau", "America/New_York", "America/Nipigon", "America/Nome", "America/Noronha", "America/North_Dakota/Beulah", "America/North_Dakota/Center", "America/North_Dakota/New_Salem", "America/Nuuk", "America/Ojinaga", "America/Panama", "America/Pangnirtung", "America/Paramaribo", "America/Phoenix", "America/Port-au-Prince", "America/Port_of_Spain", "America/Porto_Acre", "America/Porto_Velho", "America/Puerto_Rico", "America/Punta_Arenas", "America/Rainy_River", "America/Rankin_Inlet", "America/Recife", "America/Regina", "America/Resolute", "America/Rio_Branco", "America/Rosario", "America/Santa_Isabel", "America/Santarem", "America/Santiago", "America/Santo_Domingo", "America/Sao_Paulo", "America/Scoresbysund", "America/Shiprock", "America/Sitka", "America/St_Barthelemy", "America/St_Johns", "America/St_Kitts", "America/St_Lucia", "America/St_Thomas", "America/St_Vincent", "America/Swift_Current", "America/Tegucigalpa", "America/Thule", "America/Thunder_Bay", "America/Tijuana", "America/Toronto", "America/Tortola", "America/Vancouver", "America/Virgin", "America/Whitehorse", "America/Winnipeg", "America/Yakutat", "America/Yellowknife", "Antarctica/Casey", "Antarctica/Davis", "Antarctica/DumontDUrville", "Antarctica/Macquarie", "Antarctica/Mawson", "Antarctica/McMurdo", "Antarctica/Palmer", "Antarctica/Rothera", "Antarctica/South_Pole", "Antarctica/Syowa", "Antarctica/Troll", "Antarctica/Vostok", "Arctic/Longyearbyen", "Asia/Aden", "Asia/Almaty", "Asia/Amman", "Asia/Anadyr", "Asia/Aqtau", "Asia/Aqtobe", "Asia/Ashgabat", "Asia/Ashkhabad", "Asia/Atyrau", "Asia/Baghdad", "Asia/Bahrain", "Asia/Baku", "Asia/Bangkok", "Asia/Barnaul", "Asia/Beirut", "Asia/Bishkek", "Asia/Brunei", "Asia/Calcutta", "Asia/Chita", "Asia/Choibalsan", "Asia/Chongqing", "Asia/Chungking", "Asia/Colombo", "Asia/Dacca", "Asia/Damascus", "Asia/Dhaka", "Asia/Dili", "Asia/Dubai", "Asia/Dushanbe", "Asia/Famagusta", "Asia/Gaza", "Asia/Harbin", "Asia/Hebron", "Asia/Ho_Chi_Minh", "Asia/Hong_Kong", "Asia/Hovd", "Asia/Irkutsk", "Asia/Istanbul", "Asia/Jakarta", "Asia/Jayapura", "Asia/Jerusalem", "Asia/Kabul", "Asia/Kamchatka", "Asia/Karachi", "Asia/Kashgar", "Asia/Kathmandu", "Asia/Katmandu", "Asia/Khandyga", "Asia/Kolkata", "Asia/Krasnoyarsk", "Asia/Kuala_Lumpur", "Asia/Kuching", "Asia/Kuwait", "Asia/Macao", "Asia/Macau", "Asia/Magadan", "Asia/Makassar", "Asia/Manila", "Asia/Muscat", "Asia/Nicosia", "Asia/Novokuznetsk", "Asia/Novosibirsk", "Asia/Omsk", "Asia/Oral", "Asia/Phnom_Penh", "Asia/Pontianak", "Asia/Pyongyang", "Asia/Qatar", "Asia/Qostanay", "Asia/Qyzylorda", "Asia/Rangoon", "Asia/Riyadh", "Asia/Saigon", "Asia/Sakhalin", "Asia/Samarkand", "Asia/Seoul", "Asia/Shanghai", "Asia/Singapore", "Asia/Srednekolymsk", "Asia/Taipei", "Asia/Tashkent", "Asia/Tbilisi", "Asia/Tehran", "Asia/Tel_Aviv", "Asia/Thimbu", "Asia/Thimphu", "Asia/Tokyo", "Asia/Tomsk", "Asia/Ujung_Pandang", "Asia/Ulaanbaatar", "Asia/Ulan_Bator", "Asia/Urumqi", "Asia/Ust-Nera", "Asia/Vientiane", "Asia/Vladivostok", "Asia/Yakutsk", "Asia/Yangon", "Asia/Yekaterinburg", "Asia/Yerevan", "Atlantic/Azores", "Atlantic/Bermuda", "Atlantic/Canary", "Atlantic/Cape_Verde", "Atlantic/Faeroe", "Atlantic/Faroe", "Atlantic/Jan_Mayen", "Atlantic/Madeira", "Atlantic/Reykjavik", "Atlantic/South_Georgia", "Atlantic/St_Helena", "Atlantic/Stanley", "Australia/ACT", "Australia/Adelaide", "Australia/Brisbane", "Australia/Broken_Hill", "Australia/Canberra", "Australia/Currie", "Australia/Darwin", "Australia/Eucla", "Australia/Hobart", "Australia/LHI", "Australia/Lindeman", "Australia/Lord_Howe", "Australia/Melbourne", "Australia/NSW", "Australia/North", "Australia/Perth", "Australia/Queensland", "Australia/South", "Australia/Sydney", "Australia/Tasmania", "Australia/Victoria", "Australia/West", "Australia/Yancowinna", "Brazil/Acre", "Brazil/DeNoronha", "Brazil/East", "Brazil/West", "CET", "CST6CDT", "Canada/Atlantic", "Canada/Central", "Canada/Eastern", "Canada/Mountain", "Canada/Newfoundland", "Canada/Pacific", "Canada/Saskatchewan", "Canada/Yukon", "Chile/Continental", "Chile/EasterIsland", "Cuba", "EET", "EST5EDT", "Egypt", "Eire", "Etc/GMT", "Etc/GMT+0", "Etc/GMT+1", "Etc/GMT+10", "Etc/GMT+11", "Etc/GMT+12", "Etc/GMT+2", "Etc/GMT+3", "Etc/GMT+4", "Etc/GMT+5", "Etc/GMT+6", "Etc/GMT+7", "Etc/GMT+8", "Etc/GMT+9", "Etc/GMT-0", "Etc/GMT-1", "Etc/GMT-10", "Etc/GMT-11", "Etc/GMT-12", "Etc/GMT-13", "Etc/GMT-14", "Etc/GMT-2", "Etc/GMT-3", "Etc/GMT-4", "Etc/GMT-5", "Etc/GMT-6", "Etc/GMT-7", "Etc/GMT-8", "Etc/GMT-9", "Etc/GMT0", "Etc/Greenwich", "Etc/UCT", "Etc/UTC", "Etc/Universal", "Etc/Zulu", "Europe/Amsterdam", "Europe/Andorra", "Europe/Astrakhan", "Europe/Athens", "Europe/Belfast", "Europe/Belgrade", "Europe/Berlin", "Europe/Bratislava", "Europe/Brussels", "Europe/Bucharest", "Europe/Budapest", "Europe/Busingen", "Europe/Chisinau", "Europe/Copenhagen", "Europe/Dublin", "Europe/Gibraltar", "Europe/Guernsey", "Europe/Helsinki", "Europe/Isle_of_Man", "Europe/Istanbul", "Europe/Jersey", "Europe/Kaliningrad", "Europe/Kiev", "Europe/Kirov", "Europe/Kyiv", "Europe/Lisbon", "Europe/Ljubljana", "Europe/London", "Europe/Luxembourg", "Europe/Madrid", "Europe/Malta", "Europe/Mariehamn", "Europe/Minsk", "Europe/Monaco", "Europe/Moscow", "Europe/Nicosia", "Europe/Oslo", "Europe/Paris", "Europe/Podgorica", "Europe/Prague", "Europe/Riga", "Europe/Rome", "Europe/Samara", "Europe/San_Marino", "Europe/Sarajevo", "Europe/Saratov", "Europe/Simferopol", "Europe/Skopje", "Europe/Sofia", "Europe/Stockholm", "Europe/Tallinn", "Europe/Tirane", "Europe/Tiraspol", "Europe/Ulyanovsk", "Europe/Uzhgorod", "Europe/Vaduz", "Europe/Vatican", "Europe/Vienna", "Europe/Vilnius", "Europe/Volgograd", "Europe/Warsaw", "Europe/Zagreb", "Europe/Zaporozhye", "Europe/Zurich", "GB", "GB-Eire", "GMT", "GMT0", "Greenwich", "Hongkong", "Iceland", "Indian/Antananarivo", "Indian/Chagos", "Indian/Christmas", "Indian/Cocos", "Indian/Comoro", "Indian/Kerguelen", "Indian/Mahe", "Indian/Maldives", "Indian/Mauritius", "Indian/Mayotte", "Indian/Reunion", "Iran", "Israel", "Jamaica", "Japan", "Kwajalein", "Libya", "MET", "MST7MDT", "Mexico/BajaNorte", "Mexico/BajaSur", "Mexico/General", "NZ", "NZ-CHAT", "Navajo", "PRC", "PST8PDT", "Pacific/Apia", "Pacific/Auckland", "Pacific/Bougainville", "Pacific/Chatham", "Pacific/Chuuk", "Pacific/Easter", "Pacific/Efate", "Pacific/Enderbury", "Pacific/Fakaofo", "Pacific/Fiji", "Pacific/Funafuti", "Pacific/Galapagos", "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", "Pacific/Johnston", "Pacific/Kanton", "Pacific/Kiritimati", "Pacific/Kosrae", "Pacific/Kwajalein", "Pacific/Majuro", "Pacific/Marquesas", "Pacific/Midway", "Pacific/Nauru", "Pacific/Niue", "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", "Pacific/Palau", "Pacific/Pitcairn", "Pacific/Pohnpei", "Pacific/Ponape", "Pacific/Port_Moresby", "Pacific/Rarotonga", "Pacific/Saipan", "Pacific/Samoa", "Pacific/Tahiti", "Pacific/Tarawa", "Pacific/Tongatapu", "Pacific/Truk", "Pacific/Wake", "Pacific/Wallis", "Pacific/Yap", "Poland", "Portugal", "ROK", "Singapore", "SystemV/AST4", "SystemV/AST4ADT", "SystemV/CST6", "SystemV/CST6CDT", "SystemV/EST5", "SystemV/EST5EDT", "SystemV/HST10", "SystemV/MST7", "SystemV/MST7MDT", "SystemV/PST8", "SystemV/PST8PDT", "SystemV/YST9", "SystemV/YST9YDT", "Turkey", "UCT", "US/Alaska", "US/Aleutian", "US/Arizona", "US/Central", "US/East-Indiana", "US/Eastern", "US/Hawaii", "US/Indiana-Starke", "US/Michigan", "US/Mountain", "US/Pacific", "US/Samoa", "UTC", "Universal", "W-SU", "WET", "Zulu" ] + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.literal..string.zone-offset" + } ] + } ] + }, + "metabase.lib.schema.expression.temporal.week-mode" : { + "type" : "string", + "enum" : [ "iso", "us", "instance" ] + }, + "metabase.lib.schema.expression.window..offset.n" : { + "type" : "integer" + }, + "metabase.lib.schema.fields" : { + "allOf" : [ { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.ref.ref" + }, + "minItems" : 1 + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.util.distinct-mbql-clauses" + } ] + }, + "metabase.lib.schema.filter.string-filter-options" : { + "description" : "String filter operator options. Only set for `:contains`, `:does-not-contain`, `:starts-with`, `:ends-with`\n operators.", + "type" : "object", + "properties" : { + "case-sensitive" : { + "type" : "boolean" + } + } + }, + "metabase.lib.schema.filter.time-interval-options" : { + "description" : "Options for `:time-interval` operator. Note that `:relative-time-interval` does not support these options.", + "type" : "object", + "properties" : { + "include-current" : { + "type" : "boolean" + } + } + }, + "metabase.lib.schema.filters" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.boolean" + }, + "minItems" : 1 + }, + "metabase.lib.schema.id.action" : { + "description" : "Valid Action ID", + "type" : "integer", + "minimum" : 1 + }, + "metabase.lib.schema.id.card" : { + "description" : "Valid Card ID", + "type" : "integer", + "minimum" : 1 + }, + "metabase.lib.schema.id.dashboard" : { + "description" : "Valid Dashboard ID", + "type" : "integer", + "minimum" : 1 + }, + "metabase.lib.schema.id.dashcard" : { + "description" : "Valid DashboardCard ID", + "type" : "integer", + "minimum" : 1 + }, + "metabase.lib.schema.id.database" : { + "description" : "Valid Database ID", + "type" : "integer", + "minimum" : 1 + }, + "metabase.lib.schema.id.dimension" : { + "description" : "Valid Dimension ID", + "type" : "integer", + "minimum" : 1 + }, + "metabase.lib.schema.id.field" : { + "description" : "Valid Field ID", + "type" : "integer", + "minimum" : 1 + }, + "metabase.lib.schema.id.pulse" : { + "description" : "Valid Pulse ID", + "type" : "integer", + "minimum" : 1 + }, + "metabase.lib.schema.id.saved-questions-virtual-database" : { + "description" : "The ID used to signify that a database is 'virtual' rather than physical.\n\n A fake integer ID is used so as to minimize the number of changes that need to be made on the frontend -- by using\n something that would otherwise be a legal ID, *nothing* need change there, and the frontend can query against this\n 'database' none the wiser. (This integer ID is negative which means it will never conflict with a *real* database\n ID.)\n\n This ID acts as a sort of flag. The relevant places in the middleware can check whether the DB we're querying is\n this 'virtual' database and take the appropriate actions.", + "const" : -1337 + }, + "metabase.lib.schema.id.segment" : { + "description" : "Valid legacy Segment ID", + "type" : "integer", + "minimum" : 1 + }, + "metabase.lib.schema.id.snippet" : { + "description" : "Valid Snippet ID", + "type" : "integer", + "minimum" : 1 + }, + "metabase.lib.schema.id.table" : { + "description" : "Valid Table ID", + "type" : "integer", + "minimum" : 1 + }, + "metabase.lib.schema.id.user" : { + "description" : "Valid User ID", + "type" : "integer", + "minimum" : 1 + }, + "metabase.lib.schema.info.context" : { + "description" : "Schema for `info.context`; used for informational purposes to record how a query was executed.", + "type" : "string", + "enum" : [ "action", "ad-hoc", "cache-refresh", "collection", "map-tiles", "pulse", "dashboard-subscription", "dashboard", "question", "csv-download", "xlsx-download", "json-download", "public-dashboard", "public-question", "public-csv-download", "public-xlsx-download", "public-json-download", "embedded-dashboard", "embedded-question", "embedded-csv-download", "embedded-xlsx-download", "embedded-json-download", "table-grid" ] + }, + "metabase.lib.schema.info.hash" : { + "type" : "string", + "format" : "byte" + }, + "metabase.lib.schema.info.info" : { + "description" : "Schema for query `:info` dictionary, which is used for informational purposes to record information about how a query\n was executed in QueryExecution and other places. It is considered bad form for middleware to change its behavior\n based on this information, don't do it!\n\n TODO - this schema is somewhat misleading because if you use a function\n like [[metabase.query-processor/userland-query]] some of these keys (e.g. `:context`) are in fact required", + "type" : "object", + "properties" : { + "query-hash" : { + "$ref" : "#/components/schemas/metabase.lib.schema.info.hash" + }, + "action-id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.action" + }, + "pivot/original-query" : { + "type" : "object", + "additionalProperties" : { } + }, + "executed-by" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.user" + }, + "card-id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.card" + }, + "pivot/result-metadata" : { + "oneOf" : [ { + "const" : "none" + }, { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata.column" + } + } ] + }, + "context" : { + "$ref" : "#/components/schemas/metabase.lib.schema.info.context" + }, + "dashboard-id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.dashboard" + }, + "metadata/model-metadata" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata.lib-or-legacy-column" + } + }, + "pulse-id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.pulse" + }, + "card-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + } + } + }, + "metabase.lib.schema.join.alias" : { + "description" : "The name used to alias the joined table or query. This is usually generated automatically and generally looks like\n `table__via__field`. You can specify this yourself if you need to reference a joined field with a `:join-alias` in\n the options.", + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "metabase.lib.schema.join.condition" : { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.boolean" + }, + "metabase.lib.schema.join.conditions" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.join.condition" + }, + "minItems" : 1 + }, + "metabase.lib.schema.join.fields" : { + "description" : "The Fields to include in the results *if* a top-level `:fields` clause *is not* specified. This can be either\n `:none`, `:all`, or a sequence 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 Fields from the joined table or query\n\n * a sequence of Field clauses: include only the Fields specified. Only `:field` clauses are allowed here! References\n to expressions or aggregations in the thing we're joining should use column literal (string column name) `:field`\n references. This should be non-empty and all elements should be distinct (ignoring `:lib/uuid`).", + "oneOf" : [ { + "type" : "string", + "enum" : [ "all", "none" ] + }, { + "allOf" : [ { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/mbql.clause.field" + }, + "minItems" : 1 + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.util.distinct-mbql-clauses" + } ] + } ] + }, + "metabase.lib.schema.join.join" : { + "allOf" : [ { + "default" : { }, + "type" : "object", + "properties" : { + "alias" : { + "$ref" : "#/components/schemas/metabase.lib.schema.join.alias" + }, + "conditions" : { + "$ref" : "#/components/schemas/metabase.lib.schema.join.conditions" + }, + "fields" : { + "$ref" : "#/components/schemas/metabase.lib.schema.join.fields" + }, + "lib/type" : { + "default" : "mbql/join", + "const" : "mbql/join" + }, + "stages" : { + "$ref" : "#/components/schemas/metabase.lib.schema.stages" + }, + "strategy" : { + "$ref" : "#/components/schemas/metabase.lib.schema.join.strategy" + } + }, + "required" : [ "lib/type", "stages", "conditions", "alias" ] + }, { + "allOf" : [ ] + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.join.validate-field-aliases-match-join-alias" + } ] + }, + "metabase.lib.schema.join.joins" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.join.join" + }, + "minItems" : 1 + }, + "metabase.lib.schema.join.strategy" : { + "description" : "Valid values for the optional `:strategy` key in a join. Note that these are only valid if the current Database\n supports that specific join type; these match 1:1 with the Database `:features`, e.g. a Database that supports left\n joins will support the `:left-join` feature.\n\n When `:strategy` is not specified, `:left-join` is the default strategy.", + "default" : "left-join", + "type" : "string", + "enum" : [ "left-join", "right-join", "inner-join", "full-join" ] + }, + "metabase.lib.schema.join.validate-field-aliases-match-join-alias" : { }, + "metabase.lib.schema.literal..string.date" : { + "type" : "string", + "pattern" : "^\\d{4}-\\d{2}-\\d{2}$" + }, + "metabase.lib.schema.literal..string.datetime" : { + "anyOf" : [ { + "type" : "string", + "pattern" : "^\\d{4}-\\d{2}-\\d{2}[T ]\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,6})?)?$" + }, { + "type" : "string", + "pattern" : "^\\d{4}-\\d{2}-\\d{2}[T ]\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,6})?)?(?:Z|(?:[+-]\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,6})?)?))$" + } ] + }, + "metabase.lib.schema.literal..string.time" : { + "anyOf" : [ { + "type" : "string", + "pattern" : "^\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,6})?)?$" + }, { + "type" : "string", + "pattern" : "^\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,6})?)?(?:Z|(?:[+-]\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,6})?)?))$" + } ] + }, + "metabase.lib.schema.literal..string.year" : { + "type" : "string", + "pattern" : "^\\d{4}$" + }, + "metabase.lib.schema.literal..string.year-month" : { + "type" : "string", + "pattern" : "^\\d{4}-\\d{2}$" + }, + "metabase.lib.schema.literal..string.zone-offset" : { + "type" : "string", + "pattern" : "(?:Z|(?:[+-]\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,6})?)?))" + }, + "metabase.lib.schema.literal..value.options" : { + "default" : { }, + "type" : "object", + "properties" : { + "base-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "database-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "effective-type" : { + "type" : "string" + }, + "lib/uuid" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" + }, + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "semantic-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" + }, + "unit" : { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" + } + }, + "required" : [ "lib/uuid", "effective-type" ] + }, + "metabase.lib.schema.literal.date" : { + "anyOf" : [ { }, { + "$ref" : "#/components/schemas/metabase.lib.schema.literal..string.date" + } ] + }, + "metabase.lib.schema.literal.datetime" : { + "anyOf" : [ { + "$ref" : "#/components/schemas/metabase.lib.schema.literal..string.datetime" + }, { }, { }, { } ] + }, + "metabase.lib.schema.literal.integer" : { + "anyOf" : [ { + "type" : "integer" + }, { } ] + }, + "metabase.lib.schema.literal.jvm.big-decimal" : { }, + "metabase.lib.schema.literal.jvm.float" : { }, + "metabase.lib.schema.literal.literal" : { + "anyOf" : [ { + "type" : "null" + }, { + "type" : "boolean" + }, { + "type" : "string" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.literal.integer" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.literal.non-integer-real" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.literal.temporal" + } ] + }, + "metabase.lib.schema.literal.non-integer-real" : { + "anyOf" : [ { + "type" : "number" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.literal.jvm.float" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.literal.jvm.big-decimal" + } ] + }, + "metabase.lib.schema.literal.temporal" : { + "anyOf" : [ { + "$ref" : "#/components/schemas/metabase.lib.schema.literal.date" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.literal.time" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.literal.datetime" + } ] + }, + "metabase.lib.schema.literal.time" : { + "description" : "time literal", + "anyOf" : [ { + "$ref" : "#/components/schemas/metabase.lib.schema.literal..string.time" + }, { }, { } ] + }, + "metabase.lib.schema.mbql-clause.clause" : { + "oneOf" : [ { }, { + "$ref" : "#/components/schemas/mbql.clause.!=" + }, { + "$ref" : "#/components/schemas/mbql.clause.*" + }, { + "$ref" : "#/components/schemas/mbql.clause.+" + }, { + "$ref" : "#/components/schemas/mbql.clause.-" + }, { + "$ref" : "#/components/schemas/mbql.clause.~1" + }, { + "$ref" : "#/components/schemas/mbql.clause.<" + }, { + "$ref" : "#/components/schemas/mbql.clause.<=" + }, { + "$ref" : "#/components/schemas/mbql.clause.=" + }, { + "$ref" : "#/components/schemas/mbql.clause.>" + }, { + "$ref" : "#/components/schemas/mbql.clause.>=" + }, { + "$ref" : "#/components/schemas/mbql.clause.abs" + }, { + "$ref" : "#/components/schemas/mbql.clause.absolute-datetime" + }, { + "$ref" : "#/components/schemas/mbql.clause.aggregation" + }, { + "$ref" : "#/components/schemas/mbql.clause.and" + }, { + "$ref" : "#/components/schemas/mbql.clause.asc" + }, { + "$ref" : "#/components/schemas/mbql.clause.avg" + }, { + "$ref" : "#/components/schemas/mbql.clause.between" + }, { + "$ref" : "#/components/schemas/mbql.clause.case" + }, { + "$ref" : "#/components/schemas/mbql.clause.ceil" + }, { + "$ref" : "#/components/schemas/mbql.clause.coalesce" + }, { + "$ref" : "#/components/schemas/mbql.clause.concat" + }, { + "$ref" : "#/components/schemas/mbql.clause.contains" + }, { + "$ref" : "#/components/schemas/mbql.clause.convert-timezone" + }, { + "$ref" : "#/components/schemas/mbql.clause.count" + }, { + "$ref" : "#/components/schemas/mbql.clause.count-where" + }, { + "$ref" : "#/components/schemas/mbql.clause.cum-count" + }, { + "$ref" : "#/components/schemas/mbql.clause.cum-sum" + }, { + "$ref" : "#/components/schemas/mbql.clause.date" + }, { + "$ref" : "#/components/schemas/mbql.clause.datetime" + }, { + "$ref" : "#/components/schemas/mbql.clause.datetime-add" + }, { + "$ref" : "#/components/schemas/mbql.clause.datetime-diff" + }, { + "$ref" : "#/components/schemas/mbql.clause.datetime-subtract" + }, { + "$ref" : "#/components/schemas/mbql.clause.day-name" + }, { + "$ref" : "#/components/schemas/mbql.clause.desc" + }, { + "$ref" : "#/components/schemas/mbql.clause.distinct" + }, { + "$ref" : "#/components/schemas/mbql.clause.distinct-where" + }, { + "$ref" : "#/components/schemas/mbql.clause.does-not-contain" + }, { + "$ref" : "#/components/schemas/mbql.clause.domain" + }, { + "$ref" : "#/components/schemas/mbql.clause.during" + }, { + "$ref" : "#/components/schemas/mbql.clause.ends-with" + }, { + "$ref" : "#/components/schemas/mbql.clause.exp" + }, { + "$ref" : "#/components/schemas/mbql.clause.expression" + }, { + "$ref" : "#/components/schemas/mbql.clause.field" + }, { + "$ref" : "#/components/schemas/mbql.clause.float" + }, { + "$ref" : "#/components/schemas/mbql.clause.floor" + }, { + "$ref" : "#/components/schemas/mbql.clause.get-day" + }, { + "$ref" : "#/components/schemas/mbql.clause.get-day-of-week" + }, { + "$ref" : "#/components/schemas/mbql.clause.get-hour" + }, { + "$ref" : "#/components/schemas/mbql.clause.get-minute" + }, { + "$ref" : "#/components/schemas/mbql.clause.get-month" + }, { + "$ref" : "#/components/schemas/mbql.clause.get-quarter" + }, { + "$ref" : "#/components/schemas/mbql.clause.get-second" + }, { + "$ref" : "#/components/schemas/mbql.clause.get-week" + }, { + "$ref" : "#/components/schemas/mbql.clause.get-year" + }, { + "$ref" : "#/components/schemas/mbql.clause.host" + }, { + "$ref" : "#/components/schemas/mbql.clause.if" + }, { + "$ref" : "#/components/schemas/mbql.clause.in" + }, { + "$ref" : "#/components/schemas/mbql.clause.inside" + }, { + "$ref" : "#/components/schemas/mbql.clause.integer" + }, { + "$ref" : "#/components/schemas/mbql.clause.interval" + }, { + "$ref" : "#/components/schemas/mbql.clause.is-empty" + }, { + "$ref" : "#/components/schemas/mbql.clause.is-null" + }, { + "$ref" : "#/components/schemas/mbql.clause.length" + }, { + "$ref" : "#/components/schemas/mbql.clause.log" + }, { + "$ref" : "#/components/schemas/mbql.clause.lower" + }, { + "$ref" : "#/components/schemas/mbql.clause.ltrim" + }, { + "$ref" : "#/components/schemas/mbql.clause.max" + }, { + "$ref" : "#/components/schemas/mbql.clause.median" + }, { + "$ref" : "#/components/schemas/mbql.clause.metric" + }, { + "$ref" : "#/components/schemas/mbql.clause.min" + }, { + "$ref" : "#/components/schemas/mbql.clause.month-name" + }, { + "$ref" : "#/components/schemas/mbql.clause.not" + }, { + "$ref" : "#/components/schemas/mbql.clause.not-empty" + }, { + "$ref" : "#/components/schemas/mbql.clause.not-in" + }, { + "$ref" : "#/components/schemas/mbql.clause.not-null" + }, { + "$ref" : "#/components/schemas/mbql.clause.now" + }, { + "$ref" : "#/components/schemas/mbql.clause.offset" + }, { + "$ref" : "#/components/schemas/mbql.clause.or" + }, { + "$ref" : "#/components/schemas/mbql.clause.path" + }, { + "$ref" : "#/components/schemas/mbql.clause.percentile" + }, { + "$ref" : "#/components/schemas/mbql.clause.power" + }, { + "$ref" : "#/components/schemas/mbql.clause.quarter-name" + }, { + "$ref" : "#/components/schemas/mbql.clause.regex-match-first" + }, { + "$ref" : "#/components/schemas/mbql.clause.relative-datetime" + }, { + "$ref" : "#/components/schemas/mbql.clause.relative-time-interval" + }, { + "$ref" : "#/components/schemas/mbql.clause.replace" + }, { + "$ref" : "#/components/schemas/mbql.clause.round" + }, { + "$ref" : "#/components/schemas/mbql.clause.rtrim" + }, { + "$ref" : "#/components/schemas/mbql.clause.segment" + }, { + "$ref" : "#/components/schemas/mbql.clause.share" + }, { + "$ref" : "#/components/schemas/mbql.clause.split-part" + }, { + "$ref" : "#/components/schemas/mbql.clause.sqrt" + }, { + "$ref" : "#/components/schemas/mbql.clause.starts-with" + }, { + "$ref" : "#/components/schemas/mbql.clause.stddev" + }, { + "$ref" : "#/components/schemas/mbql.clause.subdomain" + }, { + "$ref" : "#/components/schemas/mbql.clause.substring" + }, { + "$ref" : "#/components/schemas/mbql.clause.sum" + }, { + "$ref" : "#/components/schemas/mbql.clause.sum-where" + }, { + "$ref" : "#/components/schemas/mbql.clause.temporal-extract" + }, { + "$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" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.visibility-type" + }, + "fk-join-alias" : { + "$ref" : "#/components/schemas/metabase.lib.schema.join.alias" + }, + "lib/external-remap" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.external" + }, + "inherited-temporal-unit" : { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" + }, + "lib/source-column-alias" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata.source-column-alias" + }, + "database-type" : { + "type" : "string" + }, + "lib/type" : { + "default" : "metadata/column", + "const" : "metadata/column" + }, + "settings" : { + "type" : "object", + "additionalProperties" : { } + }, + "fingerprint" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.fingerprint" + }, + "display-name" : { + "type" : "string" + }, + "lib/source-uuid" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" + }, + "qp/implicit-field?" : { + "type" : "boolean" + }, + "lib/ref-name" : { + "type" : "string" + }, + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + }, + "effective-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "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/original-expression-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "fk-field-name" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "lib/card-id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.card" + }, + "lib/expression-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "lib/breakout?" : { + "type" : "boolean" + }, + "metabase.lib.field/temporal-unit" : { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" + }, + "metabase.lib.field/binning" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning" + }, + "nfc-path" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "lib/model-display-name" : { + "type" : "string" + }, + "has-field-values" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.has-field-values" + }, + "lib/internal-remap" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.internal" + }, + "selected?" : { + "type" : "boolean" + }, + "source-alias" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "source" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.legacy-source" + }, + "metabase.lib.join/join-alias" : { + "$ref" : "#/components/schemas/metabase.lib.schema.join.alias" + }, + "fk-field-id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + }, + "lib/original-binning" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning" + }, + "lib/original-join-alias" : { + "$ref" : "#/components/schemas/metabase.lib.schema.join.alias" + }, + "lib/original-display-name" : { + "type" : "string" + }, + "lib/source" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.source" + }, + "active" : { + "type" : "boolean" + }, + "lib/ref-display-name" : { + "type" : "string" + }, + "lib/original-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata.original-name" + }, + "semantic-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" + }, + "fk-target-field-id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + }, + "field-ref" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Reference" + }, + "lib/desired-column-alias" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata.desired-column-alias" + } + }, + "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" + } ] + }, + "metabase.lib.schema.metadata.deduplicated-name" : { + "type" : "string", + "description" : "The simply-deduplicated name that was historically used in QP results metadata (originally calculated by\n the [[metabase.query-processor.middleware.annotate]] middleware, now calculated\n by [[metabase.lib.middleware.result-metadata]]). This just adds suffixes to column names e.g. `ID` and `ID` become\n `ID` and `ID_2`, respectively. Kept around because many old field refs use this column name.", + "optional" : true + }, + "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%" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent" + } + } + }, + "metabase.lib.schema.metadata.fingerprint..fingerprint.number" : { + "description" : "Schema for fingerprint information for Fields deriving from `:type/Number`.", + "type" : "object", + "properties" : { + "avg" : { + "type" : "number" + }, + "max" : { + "type" : "number" + }, + "min" : { + "type" : "number" + }, + "q1" : { + "type" : "number" + }, + "q3" : { + "type" : "number" + }, + "sd" : { + "type" : "number" + } + } + }, + "metabase.lib.schema.metadata.fingerprint..fingerprint.temporal" : { + "description" : "Schema for fingerprint information for Fields deriving from `:type/Temporal`.", + "type" : "object", + "properties" : { + "earliest" : { + "type" : "string" + }, + "latest" : { + "type" : "string" + } + } + }, + "metabase.lib.schema.metadata.fingerprint..fingerprint.text" : { + "description" : "Schema for fingerprint information for Fields deriving from `:type/Text`.", + "type" : "object", + "properties" : { + "average-length" : { + "type" : "number" + }, + "percent-email" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent" + }, + "percent-json" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent" + }, + "percent-state" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent" + }, + "percent-url" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent" + } + } + }, + "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" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.visibility-type" + }, + "fk-join-alias" : { + "$ref" : "#/components/schemas/metabase.lib.schema.join.alias" + }, + "lib/external-remap" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.external" + }, + "inherited-temporal-unit" : { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" + }, + "lib/source-column-alias" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata.source-column-alias" + }, + "database-type" : { + "type" : "string" + }, + "lib/type" : { + "default" : "metadata/column", + "const" : "metadata/column" + }, + "settings" : { + "type" : "object", + "additionalProperties" : { } + }, + "fingerprint" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.fingerprint" + }, + "display-name" : { + "type" : "string" + }, + "lib/source-uuid" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" + }, + "qp/implicit-field?" : { + "type" : "boolean" + }, + "lib/ref-name" : { + "type" : "string" + }, + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + }, + "effective-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "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/original-expression-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "fk-field-name" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "lib/card-id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.card" + }, + "lib/expression-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "lib/breakout?" : { + "type" : "boolean" + }, + "metabase.lib.field/temporal-unit" : { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" + }, + "metabase.lib.field/binning" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning" + }, + "nfc-path" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "lib/model-display-name" : { + "type" : "string" + }, + "has-field-values" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.has-field-values" + }, + "lib/internal-remap" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.internal" + }, + "selected?" : { + "type" : "boolean" + }, + "source-alias" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "source" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.legacy-source" + }, + "metabase.lib.join/join-alias" : { + "$ref" : "#/components/schemas/metabase.lib.schema.join.alias" + }, + "fk-field-id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + }, + "lib/original-binning" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning" + }, + "lib/original-join-alias" : { + "$ref" : "#/components/schemas/metabase.lib.schema.join.alias" + }, + "lib/original-display-name" : { + "type" : "string" + }, + "lib/source" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.source" + }, + "active" : { + "type" : "boolean" + }, + "lib/ref-display-name" : { + "type" : "string" + }, + "lib/original-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata.original-name" + }, + "semantic-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" + }, + "fk-target-field-id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + }, + "field-ref" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Reference" + }, + "lib/desired-column-alias" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata.desired-column-alias" + } + }, + "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" + } ] + }, { + "$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" : { + "type" : "string", + "description" : "The original name of the column as it appeared in the very first place it came from (i.e., the physical name of the\n column in the table it appears in). This should be the same as the `:lib/source-column-alias` for the very first\n usage of the column.\n Allowed to be blank because some databases like SQL Server allow blank column names.", + "optional" : true + }, + "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?" : { + "type" : "boolean", + "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." + }, + "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?" : { + "type" : "boolean", + "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`." + }, + "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?" : { + "type" : "boolean", + "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." + } + } + }, + "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 ], 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" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "database-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "effective-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "lib/uuid" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" + }, + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "semantic-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" + }, + "temporal-unit" : { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" + } + }, + "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" : { + "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" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "metabase.lib.field/original-temporal-unit" : { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" + }, + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "source-field-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "effective-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "base-type" : { + "type" : "string" + }, + "lib/uuid" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" + }, + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "metabase.lib.field/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" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" + } + }, + "required" : [ "lib/uuid", "base-type" ] + }, + "metabase.lib.schema.ref..field.options" : { + "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" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "metabase.lib.field/original-temporal-unit" : { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" + }, + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "source-field-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "effective-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "base-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "lib/uuid" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" + }, + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "metabase.lib.field/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" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" + } + }, + "required" : [ "lib/uuid" ] + }, + "metabase.lib.schema.ref.aggregation-options" : { + "default" : { }, + "type" : "object", + "properties" : { + "base-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "database-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "display-name" : { + "type" : "string", + "minLength" : 1 + }, + "effective-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "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" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" + } + }, + "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" : { + "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" : { + "$ref" : "#/components/schemas/metabase.lib.schema.template-tag..field-filter.options" + }, + "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-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.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.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" ] + }, + "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.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.notification.models.FullyHydratedNotification" : { + "description" : "Fully hydrated notification.", + "oneOf" : [ { + "oneOf" : [ { + "type" : "object", + "properties" : { + "creator" : { + "type" : "object", + "properties" : { } + }, + "handlers" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "active" : { + "type" : "boolean" + }, + "channel" : { + "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel" + }, + "channel_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "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" : { + "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplate" + }, + "template_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "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" : { + "type" : "object", + "properties" : { } + }, + "handlers" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "active" : { + "type" : "boolean" + }, + "channel" : { + "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel" + }, + "channel_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "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" : { + "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplate" + }, + "template_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "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" : { + "type" : "object", + "properties" : { } + }, + "creator_id" : { + "type" : "integer" + }, + "handlers" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "active" : { + "type" : "boolean" + }, + "channel" : { + "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel" + }, + "channel_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "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" : { + "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplate" + }, + "template_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "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" : { + "type" : "object", + "properties" : { } + }, + "creator_id" : { + "type" : "integer" + }, + "handlers" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "active" : { + "type" : "boolean" + }, + "channel" : { + "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel" + }, + "channel_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "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" : { + "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplate" + }, + "template_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "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" : { + "type" : "object", + "properties" : { } + }, + "handlers" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "active" : { + "type" : "boolean" + }, + "channel" : { + "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel" + }, + "channel_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "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" : { + "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplate" + }, + "template_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "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" : { + "type" : "object", + "properties" : { } + }, + "handlers" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "active" : { + "type" : "boolean" + }, + "channel" : { + "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel" + }, + "channel_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "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" : { + "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplate" + }, + "template_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "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" ] + } + }, + "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.notification.models.NotificationCard" : { + "description" : "Schema for :model/NotificationCard.", + "type" : "object", + "properties" : { + "card" : { + "type" : "object", + "properties" : { } + }, + "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" + } + }, + "required" : [ "card_id" ] + }, + "metabase.notification.models.NotificationHandler" : { + "type" : "object", + "properties" : { + "active" : { + "type" : "boolean" + }, + "channel_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "channel_type" : { }, + "notification_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "template_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "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 + } + }, + "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" : { } + }, + "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" + }, + "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" : { + "type" : "string", + "enum" : [ "cron/raw", "cron/builder" ] + } + }, + "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" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id" + } + }, + "mappings" : { + "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 + } ] + }, + "sectionId" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "values_source_config" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.values-source-config" + }, + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id" + }, + "name" : { + "type" : "string" + }, + "slug" : { + "type" : "string" + }, + "values_query_type" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.values-query-type" + }, + "type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.parameter.type" + }, + "temporal_units" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" + } + }, + "target" : { + "$ref" : "#/components/schemas/metabase.lib.schema.parameter.target" + }, + "values_source_type" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.values-source-type" + }, + "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" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.card" + }, + "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).", + "type" : "object", + "properties" : { + "dataset_query" : { + "$ref" : "#/components/schemas/metabase.queries.schema.query" + }, + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.card" + }, + "parameter_mappings" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" + }, + "parameters" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" + }, + "result_metadata" : { + "$ref" : "#/components/schemas/metabase.queries.schema..card.result-metadata" + }, + "type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..card.type" + } + } + }, + "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..result-metadata.column" : { + "description" : "A single result metadata column as returned by the Query Processor.", + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.legacy-column-metadata" + }, + "metabase.query-processor.schema.export-format" : { + "description" : "Schema for valid export formats for downloading query results.", + "type" : "string", + "enum" : [ "csv", "api", "xlsx", "json" ] + }, + "metabase.sync.schedules.ExpandedSchedulesMap" : { + "description" : "value must be a valid map of schedule maps for a DB.", + "type" : "object", + "properties" : { + "cache_field_values" : { + "$ref" : "#/components/schemas/metabase.util.cron.ScheduleMap" + }, + "metadata_sync" : { + "$ref" : "#/components/schemas/metabase.util.cron.ScheduleMap" + } + } + }, + "metabase.tiles.api.legacy-ref" : { + "description" : "Form-encoded JSON-encoded legacy MBQL :field ref.", + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field" + }, + "metabase.tiles.api.parameters" : { + "description" : "Form-encoded JSON-encoded array of parameter maps.", + "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" + }, + "metabase.tiles.api.query" : { + "description" : "Form-encoded JSON-encoded MBQL query.", + "$ref" : "#/components/schemas/metabase.lib.schema.query" + }, + "metabase.timeline.api.timeline.Timeline" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "id" ] + }, + "metabase.timeline.api.timeline.include" : { + "type" : "string", + "enum" : [ "events" ] + }, + "metabase.users.api.user-group-membership" : { + "description" : "Group Membership info of a User.\n In which :is_group_manager is only included if `advanced-permissions` is enabled.", + "type" : "object", + "properties" : { + "id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "is_group_manager" : { + "description" : "Only relevant if `advanced-permissions` is enabled. If it is, you should always include this key.", + "type" : "boolean" + } + }, + "required" : [ "id" ] + }, + "metabase.util.cron.CronHour" : { + "type" : "integer", + "minimum" : 0, + "maximum" : 23 + }, + "metabase.util.cron.CronMinute" : { + "type" : "integer", + "minimum" : 0, + "maximum" : 59 + }, + "metabase.util.cron.CronScheduleString" : { + "description" : "value must be a valid Quartz cron schedule string.", + "type" : "string", + "minLength" : 1 + }, + "metabase.util.cron.ScheduleMap" : { + "description" : "value must be a valid schedule map. See schema in metabase.util.cron for details.", + "type" : "object", + "properties" : { + "schedule_day" : { + "type" : "string", + "enum" : [ "sun", "mon", "tue", "wed", "thu", "fri", "sat" ] + }, + "schedule_frame" : { + "type" : "string", + "enum" : [ "first", "mid", "last" ] + }, + "schedule_hour" : { + "$ref" : "#/components/schemas/metabase.util.cron.CronHour" + }, + "schedule_minute" : { + "$ref" : "#/components/schemas/metabase.util.cron.CronMinute" + }, + "schedule_type" : { + "type" : "string", + "enum" : [ "hourly", "daily", "weekly", "monthly" ] + } + }, + "required" : [ "schedule_type" ] + }, + "metabase.warehouse-schema.api.table.data-authority-write" : { + "description" : "Schema for writing a valid table data authority.", + "type" : "string", + "enum" : [ "computed", "authoritative", "unconfigured", "ingested" ] + }, + "metabase.warehouses.api.available-settings" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "properties" : { + "enabled" : { + "type" : "boolean" + }, + "reasons" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "key" : { + "type" : "string" + }, + "message" : { + "anyOf" : [ { + "type" : "string" + }, { } ] + }, + "type" : { + "type" : "string", + "enum" : [ "error", "warning" ] + } + }, + "required" : [ "key", "type", "message" ] + } + } + }, + "required" : [ "enabled" ] + } + }, + "metabase.xrays.api.automagic-dashboards.base-64-encoded-json" : { + "description" : "form-encoded base-64-encoded JSON" + }, + "metabase.xrays.api.automagic-dashboards.entity-id-or-query" : { + "description" : "One of these:\n\n * A non-empty string with an Entity ID (including `card__`-encoded Card IDs)\n\n * a form-encoded base-64-encoded JSON-encoded MBQL query\n\n * The name of a transform\n\n (Effectively since the names of transforms are unconstrained this parameter is allowed to be any form-encoded\n string.)", + "type" : "string", + "minLength" : 1 + }, + "metabot.reaction.redirect" : { + "type" : "object", + "properties" : { + "type" : { + "const" : "metabot.reaction/redirect" + }, + "url" : { + "type" : "string" + } + }, + "required" : [ "type", "url" ] + } + } + }, + "paths" : { + "/api/action/" : { + "get" : { + "summary" : "GET /api/action/", + "description" : "Returns actions that can be used for QueryActions. By default lists all viewable actions. Pass optional\n `?model-id=` to limit to actions on a particular model.", + "parameters" : [ { + "in" : "query", + "name" : "model-id", + "required" : false, + "schema" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.card" + } + } ], + "responses" : { + "2XX" : { + "description" : "sequence of An Action as it should appear when we `SELECT` it from the app DB.", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.actions.schema.action" + } + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/action" ] + }, + "post" : { + "summary" : "POST /api/action/", + "description" : "Create a new action.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "An Action as it should appear when we `SELECT` it from the app DB.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.actions.schema.action" + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.actions.schema..action.for-insert" + } + } + } + }, + "tags" : [ "/api/action" ] + } + }, + "/api/action/public" : { + "get" : { + "summary" : "GET /api/action/public", + "description" : "Fetch a list of Actions with public UUIDs. These actions are publicly-accessible *if* public sharing is enabled.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "sequence of An Action as it should appear when we `SELECT` it from the app DB.", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.actions.schema.action" + } + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/action" ] + } + }, + "/api/action/{action-id}" : { + "get" : { + "summary" : "GET /api/action/{action-id}", + "description" : "Fetch an Action.", + "parameters" : [ { + "in" : "path", + "name" : "action-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "An Action as it should appear when we `SELECT` it from the app DB.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.actions.schema.action" + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/action" ] + }, + "delete" : { + "summary" : "DELETE /api/action/{action-id}", + "description" : "Delete an Action.", + "parameters" : [ { + "in" : "path", + "name" : "action-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/action" ] + } + }, + "/api/action/{action-id}/execute" : { + "get" : { + "summary" : "GET /api/action/{action-id}/execute", + "description" : "Fetches the values for filling in execution parameters. Pass PK parameters and values to select.", + "parameters" : [ { + "in" : "path", + "name" : "action-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "parameters", + "required" : true, + "schema" : { + "type" : "string" + }, + "description" : "value must be a valid JSON string." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/action" ] + } + }, + "/api/action/{id}" : { + "put" : { + "summary" : "PUT /api/action/{id}", + "description" : "Update an Action.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.actions.schema.id" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.actions.schema..action.for-update" + } + } + } + }, + "tags" : [ "/api/action" ] + } + }, + "/api/action/{id}/execute" : { + "post" : { + "summary" : "POST /api/action/{id}/execute", + "description" : "Execute the Action.\n\n `parameters` should be the mapped dashboard parameters with values.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.actions.schema.id" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "parameters" : { + "type" : "object", + "additionalProperties" : { } + } + }, + "optional" : true + } + } + } + }, + "tags" : [ "/api/action" ] + } + }, + "/api/action/{id}/public_link" : { + "post" : { + "summary" : "POST /api/action/{id}/public_link", + "description" : "Generate publicly-accessible links for this Action. Returns UUID to be used in public links. (If this\n Action has already been shared, it will return the existing public link rather than creating a new one.) Public\n sharing must be enabled.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.actions.schema.id" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/action" ] + }, + "delete" : { + "summary" : "DELETE /api/action/{id}/public_link", + "description" : "Delete the publicly-accessible link to this Dashboard.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.actions.schema.id" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/action" ] + } + }, + "/api/activity/most_recently_viewed_dashboard" : { + "get" : { + "summary" : "GET /api/activity/most_recently_viewed_dashboard", + "description" : "Get the most recently viewed dashboard for the current user. Returns a 204 if the user has not viewed any dashboards\n in the last 24 hours.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/activity" ] + } + }, + "/api/activity/popular_items" : { + "get" : { + "summary" : "GET /api/activity/popular_items", + "description" : "Get the list of 5 popular things on the instance. Query takes 8 and limits to 5 so that if it finds anything\n archived, deleted, etc it can usually still get 5. ", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/activity" ] + } + }, + "/api/activity/recent_views" : { + "get" : { + "summary" : "GET /api/activity/recent_views", + "description" : "Get a list of 100 models (cards, models, tables, dashboards, and collections) that the current user has been viewing most\n recently. Return a maximum of 20 model of each, if they've looked at at least 20.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/activity" ] + } + }, + "/api/activity/recents" : { + "get" : { + "summary" : "GET /api/activity/recents", + "description" : "Get a list of recent items the current user has been viewing most recently under the `:recents` key.\n Allows for filtering by context: views or selections", + "parameters" : [ { + "in" : "query", + "name" : "context", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "selections", "views" ] + } + } + }, { + "in" : "query", + "name" : "include_metadata", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/activity" ] + }, + "post" : { + "summary" : "POST /api/activity/recents", + "description" : "Adds a model to the list of recently selected items.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "context" : { + "type" : "string", + "enum" : [ "selection" ] + }, + "model" : { + "type" : "string", + "enum" : [ "card", "dataset", "metric", "dashboard", "table", "collection", "document" ] + }, + "model_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "model", "model_id", "context" ] + } + } + } + }, + "tags" : [ "/api/activity" ] + } + }, + "/api/alert/" : { + "get" : { + "summary" : "GET /api/alert/", + "description" : "Fetch alerts which the current user has created or will receive, or all alerts if the user is an admin.\n The optional `user_id` will return alerts created by the corresponding user, but is ignored for non-admin users.", + "parameters" : [ { + "in" : "query", + "name" : "archived", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "user_id", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "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/alert" ] + } + }, + "/api/alert/{id}" : { + "get" : { + "summary" : "GET /api/alert/{id}", + "description" : "Fetch an alert by ID", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/alert" ] + } + }, + "/api/alert/{id}/subscription" : { + "delete" : { + "summary" : "DELETE /api/alert/{id}/subscription", + "description" : "For users to unsubscribe themselves from the given alert.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "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/alert" ] + } + }, + "/api/analytics/anonymous-stats" : { + "get" : { + "summary" : "GET /api/analytics/anonymous-stats", + "description" : "Anonymous usage stats. Endpoint for testing, and eventually exposing this to instance admins to let them see\n what is being phoned home.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/analytics" ] + } + }, + "/api/api-key/" : { + "post" : { + "summary" : "POST /api/api-key/", + "description" : "Create a new API key (and an associated `User`) with the provided name and group ID.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "group_id" : { + "$ref" : "#/components/schemas/metabase.api-keys.schema.id" + }, + "name" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "group_id", "name" ] + } + } + } + }, + "tags" : [ "/api/api-key" ] + }, + "get" : { + "summary" : "GET /api/api-key/", + "description" : "Get a list of API keys with the default scope. Non-paginated.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/api-key" ] + } + }, + "/api/api-key/count" : { + "get" : { + "summary" : "GET /api/api-key/count", + "description" : "Get the count of API keys in the DB with the default scope.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/api-key" ] + } + }, + "/api/api-key/{id}" : { + "put" : { + "summary" : "PUT /api/api-key/{id}", + "description" : "Update an API key by changing its group and/or its name", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "group_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "name" : { + "$ref" : "#/components/schemas/metabase.api-keys.schema.name" + } + } + } + } + } + }, + "tags" : [ "/api/api-key" ] + }, + "delete" : { + "summary" : "DELETE /api/api-key/{id}", + "description" : "Delete an ApiKey", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.api-keys.schema.id" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/api-key" ] + } + }, + "/api/api-key/{id}/regenerate" : { + "put" : { + "summary" : "PUT /api/api-key/{id}/regenerate", + "description" : "Regenerate an API Key", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.api-keys.schema.id" + } + } ], + "responses" : { + "2XX" : { + "description" : "map where {:id -> , :unmasked_key -> '.>, :masked_key -> , :prefix -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "id" : { + "$ref" : "#/components/schemas/metabase.api-keys.schema.id" + }, + "masked_key" : { + "$ref" : "#/components/schemas/metabase.api-keys.schema..key.masked" + }, + "prefix" : { + "$ref" : "#/components/schemas/metabase.api-keys.schema.prefix" + }, + "unmasked_key" : { + "$ref" : "#/components/schemas/metabase.api-keys.schema..key.raw" + } + }, + "required" : [ "id", "unmasked_key", "masked_key", "prefix" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/api-key" ] + } + }, + "/api/automagic-dashboards/database/{id}/candidates" : { + "get" : { + "summary" : "GET /api/automagic-dashboards/database/{id}/candidates", + "description" : "Return a list of candidates for automagic dashboards ordered by interestingness.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/automagic-dashboards" ] + } + }, + "/api/automagic-dashboards/model_index/{model-index-id}/primary_key/{pk-id}" : { + "get" : { + "summary" : "GET /api/automagic-dashboards/model_index/{model-index-id}/primary_key/{pk-id}", + "description" : "Return an automagic dashboard for an entity detail specified by `entity`\n with id `id` and a primary key of `indexed-value`.", + "parameters" : [ { + "in" : "path", + "name" : "model-index-id", + "required" : true, + "schema" : { + "type" : "integer" + } + }, { + "in" : "path", + "name" : "pk-id", + "required" : true, + "schema" : { + "type" : "integer" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/automagic-dashboards" ] + } + }, + "/api/automagic-dashboards/{entity}/{entity-id-or-query}" : { + "get" : { + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}", + "description" : "Return an automagic dashboard for entity `entity` with id `id`.", + "parameters" : [ { + "in" : "path", + "name" : "entity", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] + } + }, { + "in" : "path", + "name" : "entity-id-or-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + } + }, { + "in" : "query", + "name" : "show", + "required" : false, + "schema" : { + "anyOf" : [ { + "const" : "all" + }, { + "type" : "integer", + "minimum" : 0 + } ] + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/automagic-dashboards" ] + } + }, + "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}" : { + "get" : { + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}", + "description" : "Return an automagic dashboard analyzing cell in automagic dashboard for entity `entity` defined by query\n `cell-query`.", + "parameters" : [ { + "in" : "path", + "name" : "entity", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] + } + }, { + "in" : "path", + "name" : "entity-id-or-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + } + }, { + "in" : "path", + "name" : "cell-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.base-64-encoded-json" + } + }, { + "in" : "query", + "name" : "show", + "required" : false, + "schema" : { + "anyOf" : [ { + "type" : "string", + "enum" : [ "all" ] + }, { + "type" : "integer", + "minimum" : 0 + } ] + }, + "description" : "invalid show value" + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/automagic-dashboards" ] + } + }, + "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : { + "get" : { + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}", + "description" : "Return an automagic comparison dashboard for cell in automagic dashboard for entity `entity`\n with id `id` defined by query `cell-query`; compared with entity `comparison-entity` with id\n `comparison-entity-id-or-query.`.", + "parameters" : [ { + "in" : "path", + "name" : "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" : { + "anyOf" : [ { + "type" : "string", + "enum" : [ "all" ] + }, { + "type" : "integer", + "minimum" : 0 + } ] + }, + "description" : "invalid show value" + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/automagic-dashboards" ] + } + }, + "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}" : { + "get" : { + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}", + "description" : "Return an automagic dashboard analyzing cell in question with id `id` defined by query `cell-query` using\n dashboard-template `dashboard-template`.", + "parameters" : [ { + "in" : "path", + "name" : "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" : "query", + "name" : "show", + "required" : false, + "schema" : { + "anyOf" : [ { + "type" : "string", + "enum" : [ "all" ] + }, { + "type" : "integer", + "minimum" : 0 + } ] + }, + "description" : "invalid show value" + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/automagic-dashboards" ] + } + }, + "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : { + "get" : { + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}", + "description" : "Return an automagic comparison dashboard for cell in automagic dashboard for entity `entity`\n with id `id` defined by query `cell-query` using dashboard-template `dashboard-template`; compared with entity\n `comparison-entity` with id `comparison-entity-id-or-query.`.", + "parameters" : [ { + "in" : "path", + "name" : "entity", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] + } + }, { + "in" : "path", + "name" : "entity-id-or-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + } + }, { + "in" : "path", + "name" : "prefix", + "required" : true, + "schema" : { } + }, { + "in" : "path", + "name" : "dashboard-template", + "required" : true, + "schema" : { }, + "description" : "invalid value for dashboard template name" + }, { + "in" : "path", + "name" : "cell-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.base-64-encoded-json" + } + }, { + "in" : "path", + "name" : "comparison-entity", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "adhoc", "segment", "table" ] + }, + "description" : "Invalid comparison entity type. Can only be one of \"table\", \"segment\", or \"adhoc\"" + }, { + "in" : "path", + "name" : "comparison-entity-id-or-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + } + }, { + "in" : "query", + "name" : "show", + "required" : false, + "schema" : { + "anyOf" : [ { + "type" : "string", + "enum" : [ "all" ] + }, { + "type" : "integer", + "minimum" : 0 + } ] + }, + "description" : "invalid show value" + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/automagic-dashboards" ] + } + }, + "/api/automagic-dashboards/{entity}/{entity-id-or-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : { + "get" : { + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}", + "description" : "Return an automagic comparison dashboard for entity `entity` with id `id` compared with entity `comparison-entity`\n with id `comparison-entity-id-or-query.`", + "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" : { + "anyOf" : [ { + "type" : "string", + "enum" : [ "all" ] + }, { + "type" : "integer", + "minimum" : 0 + } ] + }, + "description" : "invalid show value" + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/automagic-dashboards" ] + } + }, + "/api/automagic-dashboards/{entity}/{entity-id-or-query}/query_metadata" : { + "get" : { + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/query_metadata", + "description" : "Return all metadata for an automagic dashboard for entity `entity` with id `id`.", + "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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/automagic-dashboards" ] + } + }, + "/api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}" : { + "get" : { + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}", + "description" : "Return an automagic dashboard for entity `entity` with id `id` using dashboard-template `dashboard-template`.", + "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" : { + "anyOf" : [ { + "type" : "string", + "enum" : [ "all" ] + }, { + "type" : "integer", + "minimum" : 0 + } ] + }, + "description" : "invalid show value" + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/automagic-dashboards" ] + } + }, + "/api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : { + "get" : { + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}", + "description" : "Return an automagic comparison dashboard for entity `entity` with id `id` using dashboard-template\n `dashboard-template`; compared with entity `comparison-entity` with id `comparison-entity-id-or-query.`.", + "parameters" : [ { + "in" : "path", + "name" : "entity", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] + } + }, { + "in" : "path", + "name" : "entity-id-or-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + } + }, { + "in" : "path", + "name" : "prefix", + "required" : true, + "schema" : { } + }, { + "in" : "path", + "name" : "dashboard-template", + "required" : true, + "schema" : { }, + "description" : "invalid value for dashboard template name" + }, { + "in" : "path", + "name" : "comparison-entity", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "adhoc", "segment", "table" ] + }, + "description" : "Invalid comparison entity type. Can only be one of \"table\", \"segment\", or \"adhoc\"" + }, { + "in" : "path", + "name" : "comparison-entity-id-or-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + } + }, { + "in" : "query", + "name" : "show", + "required" : false, + "schema" : { + "anyOf" : [ { + "type" : "string", + "enum" : [ "all" ] + }, { + "type" : "integer", + "minimum" : 0 + } ] + }, + "description" : "invalid show value" + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/automagic-dashboards" ] + } + }, + "/api/bookmark/" : { + "get" : { + "summary" : "GET /api/bookmark/", + "description" : "Fetch all bookmarks for the user", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/bookmark" ] + } + }, + "/api/bookmark/ordering" : { + "put" : { + "summary" : "PUT /api/bookmark/ordering", + "description" : "Sets the order of bookmarks for 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" : { + "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" : [ "orderings" ] + } + } + } + }, + "tags" : [ "/api/bookmark" ] + } + }, + "/api/bookmark/{model}/{id}" : { + "post" : { + "summary" : "POST /api/bookmark/{model}/{id}", + "description" : "Create a new bookmark for user.", + "parameters" : [ { + "in" : "path", + "name" : "model", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "card", "dashboard", "collection", "document" ] + } + }, { + "in" : "path", + "name" : "id", + "required" : true, + "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/bookmark" ] + }, + "delete" : { + "summary" : "DELETE /api/bookmark/{model}/{id}", + "description" : "Delete a bookmark. Will delete a bookmark assigned to the user making the request by model and id.", + "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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/bookmark" ] + } + }, + "/api/bug-reporting/connection-pool-details" : { + "get" : { + "summary" : "GET /api/bug-reporting/connection-pool-details", + "description" : "Returns database connection pool info for the current Metabase instance.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/bug-reporting" ] + } + }, + "/api/bug-reporting/details" : { + "get" : { + "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" : { + "summary" : "GET /api/cache/", + "description" : "Return cache configuration.", + "parameters" : [ { + "in" : "query", + "name" : "model", + "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" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "Collection id to filter results. Returns everything if not supplied." + }, { + "in" : "query", + "name" : "id", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "Model id to get configuration for." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/cache" ] + }, + "put" : { + "summary" : "PUT /api/cache/", + "description" : "Store cache configuration.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "model" : { + "type" : "string", + "enum" : [ "root", "database", "dashboard", "question" ] + }, + "model_id" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + }, + "strategy" : { + "$ref" : "#/components/schemas/metabase.cache.api.cache-strategy" + } + }, + "required" : [ "model", "model_id", "strategy" ] + } + } + } + }, + "tags" : [ "/api/cache" ] + }, + "delete" : { + "summary" : "DELETE /api/cache/", + "description" : "Delete cache configurations.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "model" : { + "type" : "string", + "enum" : [ "root", "database", "dashboard", "question" ] + }, + "model_id" : { + "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/cache/invalidate" : { + "post" : { + "summary" : "POST /api/cache/invalidate", + "description" : "Invalidate cache entries.\n\n Use it like `/api/cache/invalidate?database=1&dashboard=15` (any number of database/dashboard/question can be\n supplied).\n\n `&include=overrides` controls whenever you want to invalidate cache for a specific cache configuration without\n touching all nested configurations, or you want your invalidation to trickle down to every card.", + "parameters" : [ { + "in" : "query", + "name" : "include", + "required" : false, + "schema" : { + "const" : "overrides" + }, + "description" : "All cache configuration overrides should invalidate cache too" + }, { + "in" : "query", + "name" : "database", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + } + }, + "description" : "A list of database ids" + }, { + "in" : "query", + "name" : "dashboard", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + } + }, + "description" : "A list of dashboard ids" + }, { + "in" : "query", + "name" : "question", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + } + }, + "description" : "A list of question ids" + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/cache" ] + } + }, + "/api/card/" : { + "get" : { + "summary" : "GET /api/card/", + "description" : "Get all the Cards. Option filter param `f` can be used to change the set of Cards that are returned; default is\n `all`, but other options include `mine`, `bookmarked`, `database`, `table`, `using_model`, `using_segment`, and\n `archived`. See corresponding implementation functions above for the specific behavior of each filter\n option. :card_index:", + "parameters" : [ { + "in" : "query", + "name" : "f", + "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" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/card" ] + }, + "post" : { + "summary" : "POST /api/card/", + "description" : "Create a new `Card`. Card `type` can be `question`, `metric`, or `model`.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "visualization_settings" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "dashboard_tab_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "entity_id" : { + "type" : "string", + "minLength" : 1 + }, + "dataset_query" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "parameter_mappings" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "collection_position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "result_metadata" : { + "$ref" : "#/components/schemas/metabase.analyze.query-results.ResultsMetadata" + }, + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "type" : { + "$ref" : "#/components/schemas/metabase.queries.schema.card-type" + }, + "display" : { + "type" : "string", + "minLength" : 1 + }, + "parameters" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" + }, + "description" : { + "type" : "string", + "minLength" : 1 + }, + "dashboard_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "name", "dataset_query", "display", "visualization_settings" ] + } + } + } + }, + "tags" : [ "/api/card" ] + } + }, + "/api/card/collections" : { + "post" : { + "summary" : "POST /api/card/collections", + "description" : "Bulk update endpoint for Card Collections. Move a set of `Cards` with `card_ids` into a `Collection` with\n `collection_id`, or remove them from any Collections by passing a `null` `collection_id`.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "card_ids" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "card_ids" ] + } + } + } + }, + "tags" : [ "/api/card" ] + } + }, + "/api/card/embeddable" : { + "get" : { + "summary" : "GET /api/card/embeddable", + "description" : "Fetch a list of Cards where `enable_embedding` is `true`. The cards can be embedded using the embedding endpoints\n and a signed JWT.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/card" ] + } + }, + "/api/card/pivot/{card-id}/query" : { + "post" : { + "summary" : "POST /api/card/pivot/{card-id}/query", + "description" : "Run the query associated with a Card.", + "parameters" : [ { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "ignore_cache" : { + "type" : "boolean" + } + } + } + } + } + }, + "tags" : [ "/api/card" ] + } + }, + "/api/card/public" : { + "get" : { + "summary" : "GET /api/card/public", + "description" : "Fetch a list of Cards with public UUIDs. These cards are publicly-accessible *if* public sharing is enabled.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/card" ] + } + }, + "/api/card/{card-id}/params/{param-key}/search/{query}" : { + "get" : { + "summary" : "GET /api/card/{card-id}/params/{param-key}/search/{query}", + "description" : "Fetch possible values of the parameter whose ID is `:param-key` that contain `:query`.\n\n ;; fetch values for Card 1 parameter 'abc' that contain 'Orange';\n GET /api/card/1/params/abc/search/Orange\n\n Currently limited to first 1000 results.", + "parameters" : [ { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "param-key", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id" + } + }, { + "in" : "path", + "name" : "query", + "required" : true, + "schema" : { + "type" : "string", + "minLength" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/card" ] + } + }, + "/api/card/{card-id}/params/{param-key}/values" : { + "get" : { + "summary" : "GET /api/card/{card-id}/params/{param-key}/values", + "description" : "Fetch possible values of the parameter whose ID is `:param-key`.\n\n ;; fetch values for Card 1 parameter 'abc' that are possible\n GET /api/card/1/params/abc/values", + "parameters" : [ { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "param-key", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/card" ] + } + }, + "/api/card/{card-id}/public_link" : { + "post" : { + "summary" : "POST /api/card/{card-id}/public_link", + "description" : "Generate publicly-accessible links for this Card. Returns UUID to be used in public links. (If this Card has\n already been shared, it will return the existing public link rather than creating a new one.) Public sharing must\n be enabled.", + "parameters" : [ { + "in" : "path", + "name" : "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/card" ] + }, + "delete" : { + "summary" : "DELETE /api/card/{card-id}/public_link", + "description" : "Delete the publicly-accessible link to this Card.", + "parameters" : [ { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/card" ] + } + }, + "/api/card/{card-id}/query" : { + "post" : { + "summary" : "POST /api/card/{card-id}/query", + "description" : "Run the query associated with a Card.", + "parameters" : [ { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "anyOf" : [ { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, { + "description" : "String must be a valid 21-character NanoID string.", + "type" : "string", + "pattern" : "^[A-Za-z0-9_\\-]{21}$" + } ] + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "collection_preview" : { + "type" : "boolean" + }, + "dashboard_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "ignore_cache" : { + "default" : false, + "type" : "boolean" + } + }, + "required" : [ "ignore_cache" ] + } + } + } + }, + "tags" : [ "/api/card" ] + } + }, + "/api/card/{card-id}/query/{export-format}" : { + "post" : { + "summary" : "POST /api/card/{card-id}/query/{export-format}", + "description" : "Run the query associated with a Card, and return its results as a file in the specified format.\n\n `parameters`, `pivot-results?` and `format-rows?` should be passed as application/x-www-form-urlencoded form content\n or json in the body. This is because this endpoint is normally used to power 'Download Results' buttons that use\n HTML `form` actions).", + "parameters" : [ { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "export-format", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.query-processor.schema.export-format" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "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" : { + "type" : "array", + "items" : { + "type" : "object", + "additionalProperties" : { } + } + }, + "pivot_results" : { + "default" : false, + "type" : "boolean" + } + }, + "required" : [ "format_rows", "pivot_results" ] + } + } + } + }, + "tags" : [ "/api/card" ] + } + }, + "/api/card/{id}" : { + "get" : { + "summary" : "GET /api/card/{id}", + "description" : "Get `Card` with ID.\n\n As of v57, returns the MBQL query (`dataset_query`) as MBQL 5; to return the query as MBQL 4 (aka legacy MBQL)\n instead, you can specify `?legacy-mbql=true`.", + "parameters" : [ { + "in" : "path", + "name" : "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" : { + "type" : "boolean", + "default" : false + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/card" ] + }, + "put" : { + "summary" : "PUT /api/card/{id}", + "description" : "Update a `Card`.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "delete_old_dashcards", + "required" : false, + "schema" : { + "type" : "boolean" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "enable_embedding" : { + "type" : "boolean" + }, + "visualization_settings" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "dashboard_tab_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "collection_preview" : { + "type" : "boolean" + }, + "dataset_query" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "parameter_mappings" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "archived" : { + "type" : "boolean" + }, + "collection_position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "embedding_params" : { + "type" : "object", + "additionalProperties" : { + "type" : "string", + "enum" : [ "disabled", "enabled", "locked" ] + }, + "description" : "value must be a valid embedding params map." + }, + "result_metadata" : { + "$ref" : "#/components/schemas/metabase.analyze.query-results.ResultsMetadata" + }, + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "type" : { + "$ref" : "#/components/schemas/metabase.queries.schema.card-type" + }, + "display" : { + "type" : "string", + "minLength" : 1 + }, + "parameters" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" + }, + "description" : { + "type" : "string" + }, + "dashboard_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + } + } + } + } + }, + "tags" : [ "/api/card" ] + }, + "delete" : { + "summary" : "DELETE /api/card/{id}", + "description" : "Hard delete a Card. To soft delete, use `PUT /api/card/:id`", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/card" ] + } + }, + "/api/card/{id}/copy" : { + "post" : { + "summary" : "POST /api/card/{id}/copy", + "description" : "Copy a `Card`, with the new name 'Copy of _name_'", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/card" ] + } + }, + "/api/card/{id}/dashboards" : { + "get" : { + "summary" : "GET /api/card/{id}/dashboards", + "description" : "Get a list of `{:name ... :id ...}` pairs for all the dashboards this card appears in.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/card" ] + } + }, + "/api/card/{id}/params/{param-key}/remapping" : { + "get" : { + "summary" : "GET /api/card/{id}/params/{param-key}/remapping", + "description" : "Fetch the remapped value for a given value of the parameter with ID `:param-key`.\n\n ;; fetch the remapped value for Card 1 parameter 'abc' for value 100\n GET /api/card/1/params/abc/remapping?value=100", + "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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/card" ] + } + }, + "/api/card/{id}/query_metadata" : { + "get" : { + "summary" : "GET /api/card/{id}/query_metadata", + "description" : "Get all of the required query metadata for a card.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "anyOf" : [ { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, { + "description" : "String must be a valid 21-character NanoID string.", + "type" : "string", + "pattern" : "^[A-Za-z0-9_\\-]{21}$" + } ] + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/card" ] + } + }, + "/api/card/{id}/series" : { + "get" : { + "summary" : "GET /api/card/{id}/series", + "description" : "Fetches a list of compatible series with the card with id `card_id`.\n\n - `last_cursor` with value is the id of the last card from the previous page to fetch the next page.\n - `query` to search card by name.\n - `exclude_ids` to filter out a list of card ids", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer" + } + }, { + "in" : "query", + "name" : "last_cursor", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "query", + "required" : false, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "query", + "name" : "exclude_ids", + "required" : false, + "schema" : { } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/card" ] + } + }, + "/api/cards/dashboards" : { + "post" : { + "summary" : "POST /api/cards/dashboards", + "description" : "Get the dashboards that multiple cards appear in. The response is a sequence of maps, each of which has a `card_id`\n and `dashboards`. `dashboard` may include an `:error` key, either `:unreadable-dashboard` or\n `:unwritable-dashboard`. In the case of an `unreadable-dashboard` the dashboard details (name, ID) will NOT be\n present.", + "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 + } + } + }, + "required" : [ "card_ids" ] + } + } + } + }, + "tags" : [ "/api/cards" ] + } + }, + "/api/cards/move" : { + "post" : { + "summary" : "POST /api/cards/move", + "description" : "Moves a number of Cards to a single collection or dashboard.\n\n For now, just either succeed or fail as a batch - we can think more about error handling later down the road.", + "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" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "dashboard_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "card_ids" ] + } + } + } + }, + "tags" : [ "/api/cards" ] + } + }, + "/api/channel/" : { + "get" : { + "summary" : "GET /api/channel/", + "description" : "Get all channels", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "include_inactive" : { + "type" : "boolean", + "default" : false + } + } + } + } + } + }, + "tags" : [ "/api/channel" ] + }, + "post" : { + "summary" : "POST /api/channel/", + "description" : "Create a channel", + "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", + "default" : true + }, + "description" : { + "type" : "string", + "minLength" : 1 + }, + "details" : { + "type" : "object", + "properties" : { } + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "type" : { + "description" : "Must be a namespaced channel. E.g: channel/http" + } + }, + "required" : [ "name", "type", "details" ] + } + } + } + }, + "tags" : [ "/api/channel" ] + } + }, + "/api/channel/test" : { + "post" : { + "summary" : "POST /api/channel/test", + "description" : "Test a channel connection", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "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" ] + } + }, + "/api/channel/{id}" : { + "get" : { + "summary" : "GET /api/channel/{id}", + "description" : "Get a channel", + "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/channel" ] + }, + "put" : { + "summary" : "PUT /api/channel/{id}", + "description" : "Update a channel", + "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" : { + "active" : { + "type" : "boolean" + }, + "description" : { + "type" : "string", + "minLength" : 1 + }, + "details" : { + "type" : "object", + "properties" : { } + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "type" : { + "description" : "Must be a namespaced channel. E.g: channel/http" + } + } + } + } + } + }, + "tags" : [ "/api/channel" ] + } + }, + "/api/cloud-migration/" : { + "post" : { + "summary" : "POST /api/cloud-migration/", + "description" : "Initiate a new cloud migration.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/cloud-migration" ] + }, + "get" : { + "summary" : "GET /api/cloud-migration/", + "description" : "Get the latest cloud migration, if any.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/cloud-migration" ] + } + }, + "/api/cloud-migration/cancel" : { + "put" : { + "summary" : "PUT /api/cloud-migration/cancel", + "description" : "Cancel any ongoing cloud migrations, if any.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/cloud-migration" ] + } + }, + "/api/collection/" : { + "get" : { + "summary" : "GET /api/collection/", + "description" : "Fetch a list of all Collections that the current user has read permissions for (`:can_write` is returned as an\n additional property of each Collection so you can tell which of these you have write permissions for.)\n\n By default, this returns non-archived Collections, but instead you can show archived ones by passing\n `?archived=true`.\n\n By default, admin users will see all collections. To hide other user's collections pass in\n `?exclude-other-user-collections=true`.\n\n If personal-only is `true`, then return only personal collections where `personal_owner_id` is not `nil`.", + "parameters" : [ { + "in" : "query", + "name" : "archived", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "exclude-other-user-collections", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "namespace", + "required" : false, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "query", + "name" : "personal-only", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/collection" ] + }, + "post" : { + "summary" : "POST /api/collection/", + "description" : "Create a new Collection.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "authority_level" : { + "type" : "string", + "enum" : [ "official" ] + }, + "description" : { + "type" : "string", + "minLength" : 1 + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "namespace" : { + "type" : "string", + "minLength" : 1 + }, + "parent_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "type" : { + "type" : "string", + "enum" : [ "remote-synced" ] + } + }, + "required" : [ "name" ] + } + } + } + }, + "tags" : [ "/api/collection" ] + } + }, + "/api/collection/graph" : { + "get" : { + "summary" : "GET /api/collection/graph", + "description" : "Fetch a graph of all Collection Permissions.", + "parameters" : [ { + "in" : "query", + "name" : "namespace", + "required" : false, + "schema" : { + "type" : "string", + "minLength" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/collection" ] + }, + "put" : { + "summary" : "PUT /api/collection/graph", + "description" : "Do a batch update of Collections Permissions by passing in a modified graph. Will overwrite parts of the graph that\n are present in the request, and leave the rest unchanged.\n\n If the `force` query parameter is `true`, a `revision` number is not required. The provided graph will be persisted\n as-is, and has the potential to clobber other writes that happened since the last read.\n\n If the `skip_graph` query parameter is `true`, it will only return the current revision, not the entire permissions\n graph.", + "parameters" : [ { + "in" : "query", + "name" : "force", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "skip-graph", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "groups" : { + "type" : "object", + "properties" : { } + }, + "namespace" : { + "type" : "string", + "minLength" : 1 + }, + "revision" : { + "description" : "value must be an integer.", + "type" : "integer" + } + }, + "required" : [ "groups" ] + } + } + } + }, + "tags" : [ "/api/collection" ] + } + }, + "/api/collection/root" : { + "get" : { + "summary" : "GET /api/collection/root", + "description" : "Return the 'Root' Collection object with standard details added", + "parameters" : [ { + "in" : "query", + "name" : "namespace", + "required" : false, + "schema" : { + "type" : "string", + "minLength" : 1 + } + } ], + "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" : { + "summary" : "GET /api/collection/root/dashboard-question-candidates", + "description" : "Find cards in the root collection that can be moved into dashboards in the root collection. (Same as the above\n endpoint, but for the root collection)", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:data -> , :name -> , :description -> , :sole_dashboard_info -> , :name -> , :description -> }>}>, :total -> }", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.collections.api.DashboardQuestionCandidatesResponse" + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/collection" ] + } + }, + "/api/collection/root/items" : { + "get" : { + "summary" : "GET /api/collection/root/items", + "description" : "Fetch objects that the current user should see at their root level. As mentioned elsewhere, the 'Root' Collection\n doesn't actually exist as a row in the application DB: it's simply a virtual Collection where things with no\n `collection_id` exist. It does, however, have its own set of Permissions.\n\n This endpoint will actually show objects with no `collection_id` for Users that have Root Collection\n permissions, but for people without Root Collection perms, we'll just show the objects that have an effective\n location of `/`.\n\n This endpoint is intended to power a 'Root Folder View' for the Current User, so regardless you'll see all the\n top-level objects you're allowed to access.\n\n By default, this will show the 'normal' Collections namespace; to view a different Collections namespace, such as\n `snippets`, you can pass the `?namespace=` parameter.\n\n Note that this endpoint should return results in a similar shape to `/api/dashboard/:id/items`, so if this is\n changed, that should too.", + "parameters" : [ { + "in" : "query", + "name" : "models", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "dashboard", "dataset", "no_models", "timeline", "snippet", "collection", "document", "pulse", "metric", "card" ] + } + } + }, { + "in" : "query", + "name" : "collection_type", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "remote-synced" ] + } + }, { + "in" : "query", + "name" : "include_can_run_adhoc_query", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "archived", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "namespace", + "required" : false, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "query", + "name" : "pinned_state", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "is_not_pinned", "is_pinned", "all" ] + } + }, { + "in" : "query", + "name" : "sort_column", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "model", "name", "last_edited_by", "last_edited_at" ] + } + }, { + "in" : "query", + "name" : "sort_direction", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "desc", "asc" ] + } + }, { + "in" : "query", + "name" : "official_collections_first", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "in" : "query", + "name" : "show_dashboard_questions", + "required" : false, + "schema" : { + "type" : "boolean" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/collection" ] + } + }, + "/api/collection/root/move-dashboard-question-candidates" : { + "post" : { + "summary" : "POST /api/collection/root/move-dashboard-question-candidates", + "description" : "Move candidate cards to the dashboards they appear in (for the root collection)", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:moved -> }", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.collections.api.MoveDashboardQuestionCandidatesResponse" + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "card_ids" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "uniqueItems" : true + } + }, + "optional" : true + } + } + } + }, + "tags" : [ "/api/collection" ] + } + }, + "/api/collection/trash" : { + "get" : { + "summary" : "GET /api/collection/trash", + "description" : "Fetch the trash collection, as in `/api/collection/:trash-id`", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/collection" ] + } + }, + "/api/collection/tree" : { + "get" : { + "summary" : "GET /api/collection/tree", + "description" : "Similar to `GET /`, but returns Collections in a tree structure, e.g.\n\n ```\n [{:name \"A\"\n :below #{:card :dataset}\n :children [{:name \"B\"}\n {:name \"C\"\n :here #{:dataset :card}\n :below #{:dataset :card}\n :children [{:name \"D\"\n :here #{:dataset}\n :children [{:name \"E\"}]}\n {:name \"F\"\n :here #{:card}\n :children [{:name \"G\"}]}]}]}\n {:name \"H\"}]\n ```\n\n The here and below keys indicate the types of items at this particular level of the tree (here) and in its\n subtree (below).\n\n TODO: for historical reasons this returns Saved Questions AS 'card' AND Models as 'dataset'; we should fix this at\n some point in the future.", + "parameters" : [ { + "in" : "query", + "name" : "exclude-archived", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "exclude-other-user-collections", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "namespace", + "required" : false, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "query", + "name" : "shallow", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "collection-id", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/collection" ] + } + }, + "/api/collection/{id}" : { + "get" : { + "summary" : "GET /api/collection/{id}", + "description" : "Fetch a specific Collection with standard details added", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "anyOf" : [ { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, { + "description" : "String must be a valid 21-character NanoID string.", + "type" : "string", + "pattern" : "^[A-Za-z0-9_\\-]{21}$" + } ] + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/collection" ] + }, + "put" : { + "summary" : "PUT /api/collection/{id}", + "description" : "Modify an existing Collection, including archiving or unarchiving it, or moving it.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "archived" : { + "type" : "boolean", + "default" : false + }, + "authority_level" : { + "type" : "string", + "enum" : [ "official" ] + }, + "description" : { + "type" : "string", + "minLength" : 1 + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "parent_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "type" : { + "type" : "string", + "enum" : [ "remote-synced" ] + } + }, + "required" : [ ] + } + } + } + }, + "tags" : [ "/api/collection" ] + }, + "delete" : { + "summary" : "DELETE /api/collection/{id}", + "description" : "Deletes a collection permanently", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/collection" ] + } + }, + "/api/collection/{id}/dashboard-question-candidates" : { + "get" : { + "summary" : "GET /api/collection/{id}/dashboard-question-candidates", + "description" : "Find cards in this collection that can be moved into dashboards in this collection.\n\n To be eligible, a card must only appear in one dashboard (which is also in this collection), and must not already be a\n dashboard question.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "map where {:data -> , :name -> , :description -> , :sole_dashboard_info -> , :name -> , :description -> }>}>, :total -> }", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.collections.api.DashboardQuestionCandidatesResponse" + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/collection" ] + } + }, + "/api/collection/{id}/items" : { + "get" : { + "summary" : "GET /api/collection/{id}/items", + "description" : "Fetch a specific Collection's items with the following options:\n\n * `models` - only include objects of a specific set of `models`. If unspecified, returns objects of all models\n * `archived` - when `true`, return archived objects *instead* of unarchived ones. Defaults to `false`.\n * `pinned_state` - when `is_pinned`, return pinned objects only.\n when `is_not_pinned`, return non pinned objects only.\n when `all`, return everything. By default returns everything.\n * `include_can_run_adhoc_query` - when this is true hydrates the `can_run_adhoc_query` flag on card models\n\n Note that this endpoint should return results in a similar shape to `/api/dashboard/:id/items`, so if this is\n changed, that should too.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "anyOf" : [ { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, { + "description" : "String must be a valid 21-character NanoID string.", + "type" : "string", + "pattern" : "^[A-Za-z0-9_\\-]{21}$" + } ] + } + }, { + "in" : "query", + "name" : "models", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "dashboard", "dataset", "no_models", "timeline", "snippet", "collection", "document", "pulse", "metric", "card" ] + } + } + }, { + "in" : "query", + "name" : "archived", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "include_can_run_adhoc_query", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "pinned_state", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "is_not_pinned", "is_pinned", "all" ] + } + }, { + "in" : "query", + "name" : "sort_column", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "model", "name", "last_edited_by", "last_edited_at" ] + } + }, { + "in" : "query", + "name" : "sort_direction", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "desc", "asc" ] + } + }, { + "in" : "query", + "name" : "official_collections_first", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "in" : "query", + "name" : "show_dashboard_questions", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/collection" ] + } + }, + "/api/collection/{id}/move-dashboard-question-candidates" : { + "post" : { + "summary" : "POST /api/collection/{id}/move-dashboard-question-candidates", + "description" : "Move candidate cards to the dashboards they appear in.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "map where {:moved -> }", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.collections.api.MoveDashboardQuestionCandidatesResponse" + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "card_ids" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "uniqueItems" : true + } + }, + "optional" : true + } + } + } + }, + "tags" : [ "/api/collection" ] + } + }, + "/api/dashboard/" : { + "get" : { + "summary" : "GET /api/dashboard/", + "description" : "This endpoint is currently unused by the Metabase frontend and may be out of date with the rest of the application.\n It only exists for backwards compatibility and may be removed in the future.\n\n Get `Dashboards`. With filter option `f` (default `all`), restrict results as follows:\n * `all` - Return all Dashboards.\n * `mine` - Return Dashboards created by the current user.\n * `archived` - Return Dashboards that have been archived. (By default, these are *excluded*.)", + "parameters" : [ { + "in" : "query", + "name" : "f", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "all", "mine", "archived" ] + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/dashboard" ] + }, + "post" : { + "summary" : "POST /api/dashboard/", + "description" : "Create a new Dashboard.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "collection_position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "description" : { + "type" : "string" + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "parameters" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" + } + }, + "required" : [ "name" ] + } + } + } + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/embeddable" : { + "get" : { + "summary" : "GET /api/dashboard/embeddable", + "description" : "Fetch a list of Dashboards where `enable_embedding` is `true`. The dashboards can be embedded using the embedding\n endpoints and a signed JWT.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/params/valid-filter-fields" : { + "get" : { + "summary" : "GET /api/dashboard/params/valid-filter-fields", + "description" : "Utility endpoint for powering Dashboard UI. Given some set of `filtered` Field IDs (presumably Fields used in\n parameters) and a set of `filtering` Field IDs that will be used to restrict values of `filtered` Fields, for each\n `filtered` Field ID return the subset of `filtering` Field IDs that would actually be used in a chain filter query\n with these Fields.\n\n e.g. in a chain filter query like\n\n GET /api/dashboard/10/params/PARAM_1/values?PARAM_2=100\n\n Assume `PARAM_1` maps to Field 1 and `PARAM_2` maps to Fields 2 and 3. The underlying MBQL query may or may not\n filter against Fields 2 and 3, depending on whether an FK relationship that lets us create a join against Field 1\n can be found. You can use this endpoint to determine which of those Fields is actually used:\n\n GET /api/dashboard/params/valid-filter-fields?filtered=1&filtering=2&filtering=3\n ;; ->\n {1 [2 3]}\n\n Results are returned as a map of\n\n `filtered` Field ID -> subset of `filtering` Field IDs that would be used in chain filter query", + "parameters" : [ { + "in" : "query", + "name" : "filtered", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + } + } + }, { + "in" : "query", + "name" : "filtering", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + } + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/pivot/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query" : { + "post" : { + "summary" : "POST /api/dashboard/pivot/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query", + "description" : "Run a pivot table query for a specific DashCard.", + "parameters" : [ { + "in" : "path", + "name" : "dashboard-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "dashcard-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "parameters" : { + "type" : "array", + "items" : { + "description" : "value must be a parameter map with an 'id' key", + "allOf" : [ { + "type" : "object", + "properties" : { + "id" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "id" ] + }, { + "type" : "object", + "additionalProperties" : { } + } ] + } + } + } + } + } + } + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/public" : { + "get" : { + "summary" : "GET /api/dashboard/public", + "description" : "Fetch a list of Dashboards with public UUIDs. These dashboards are publicly-accessible *if* public sharing is\n enabled.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/save" : { + "post" : { + "summary" : "POST /api/dashboard/save", + "description" : "Save a denormalized description of dashboard.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/save/collection/{parent-collection-id}" : { + "post" : { + "summary" : "POST /api/dashboard/save/collection/{parent-collection-id}", + "description" : "Save a denormalized description of dashboard into collection with ID `:parent-collection-id`.", + "parameters" : [ { + "in" : "path", + "name" : "parent-collection-id", + "required" : true, + "schema" : { + "type" : "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/dashboard" ] + } + }, + "/api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query" : { + "post" : { + "summary" : "POST /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query", + "description" : "Run the query associated with a Saved Question (`Card`) in the context of a `Dashboard` that includes it.", + "parameters" : [ { + "in" : "path", + "name" : "dashboard-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "dashcard-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "dashboard_load_id" : { + "type" : "string", + "minLength" : 1 + }, + "parameters" : { + "type" : "array", + "items" : { + "description" : "value must be a parameter map with an 'id' key", + "allOf" : [ { + "type" : "object", + "properties" : { + "id" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "id" ] + }, { + "type" : "object", + "additionalProperties" : { } + } ] + } + } + } + } + } + } + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query/{export-format}" : { + "post" : { + "summary" : "POST /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query/{export-format}", + "description" : "Run the query associated with a Saved Question (`Card`) in the context of a `Dashboard` that includes it, and return\n its results as a file in the specified format.\n\n `parameters` should be passed as query parameter encoded as a serialized JSON string (this is because this endpoint\n is normally used to power 'Download Results' buttons that use HTML `form` actions).", + "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" + } + } ], + "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" : { + "anyOf" : [ { + "type" : "array", + "items" : { + "description" : "value must be a parameter map with an 'id' key", + "allOf" : [ { + "type" : "object", + "properties" : { + "id" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "id" ] + }, { + "type" : "object", + "additionalProperties" : { } + } ] + } + }, { + "description" : "value must be a valid JSON string.", + "type" : "string" + } ] + }, + "pivot_results" : { + "default" : false, + "type" : "boolean" + } + }, + "required" : [ "format_rows", "pivot_results" ] + } + } + } + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/execute" : { + "get" : { + "summary" : "GET /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/execute", + "description" : "Fetches the values for filling in execution parameters. Pass PK parameters and values to select.", + "parameters" : [ { + "in" : "path", + "name" : "dashboard-id", + "required" : true, + "schema" : { + "type" : "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" : "query", + "name" : "parameters", + "required" : false, + "schema" : { + "type" : "string" + }, + "description" : "value must be a valid JSON string." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/dashboard" ] + }, + "post" : { + "summary" : "POST /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/execute", + "description" : "Execute the associated Action in the context of a `Dashboard` and `DashboardCard` that includes it.\n\n `parameters` should be the mapped dashboard parameters with values.\n `extra_parameters` should be the extra, user entered parameter values.", + "parameters" : [ { + "in" : "path", + "name" : "dashboard-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "dashcard-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "parameters" : { + "type" : "object", + "additionalProperties" : { } + } + } + } + } + } + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/{dashboard-id}/public_link" : { + "post" : { + "summary" : "POST /api/dashboard/{dashboard-id}/public_link", + "description" : "Generate publicly-accessible links for this Dashboard. Returns UUID to be used in public links. (If this\n Dashboard has already been shared, it will return the existing public link rather than creating a new one.) Public\n sharing must be enabled.", + "parameters" : [ { + "in" : "path", + "name" : "dashboard-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/dashboard" ] + }, + "delete" : { + "summary" : "DELETE /api/dashboard/{dashboard-id}/public_link", + "description" : "Delete the publicly-accessible link to this Dashboard.", + "parameters" : [ { + "in" : "path", + "name" : "dashboard-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/{from-dashboard-id}/copy" : { + "post" : { + "summary" : "POST /api/dashboard/{from-dashboard-id}/copy", + "description" : "Copy a Dashboard.", + "parameters" : [ { + "in" : "path", + "name" : "from-dashboard-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "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" : { + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "collection_position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "description" : { + "type" : "string" + }, + "is_deep_copy" : { + "type" : "boolean", + "default" : false + }, + "name" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ ] + } + } + } + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/{id}" : { + "get" : { + "summary" : "GET /api/dashboard/{id}", + "description" : "Get Dashboard with ID.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "anyOf" : [ { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, { + "description" : "String must be a valid 21-character NanoID string.", + "type" : "string", + "pattern" : "^[A-Za-z0-9_\\-]{21}$" + } ] + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/dashboard" ] + }, + "delete" : { + "summary" : "DELETE /api/dashboard/{id}", + "description" : "Hard delete a Dashboard. To soft delete, use `PUT /api/dashboard/:id`\n\n This will remove also any questions/models/segments/metrics that use this database.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "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/dashboard" ] + }, + "put" : { + "summary" : "PUT /api/dashboard/{id}", + "description" : "Update a Dashboard, and optionally the `dashcards` and `tabs` of a Dashboard. The request body should be a JSON object with the same\n structure as the response from `GET /api/dashboard/:id`.", + "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" : { + "points_of_interest" : { + "type" : "string" + }, + "enable_embedding" : { + "type" : "boolean" + }, + "width" : { + "type" : "string", + "enum" : [ "fixed", "full" ] + }, + "show_in_getting_started" : { + "type" : "boolean" + }, + "position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "archived" : { + "type" : "boolean" + }, + "collection_position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "embedding_params" : { + "type" : "object", + "additionalProperties" : { + "type" : "string", + "enum" : [ "disabled", "enabled", "locked" ] + }, + "description" : "value must be a valid embedding params map." + }, + "tabs" : { + "description" : "value must be seq of maps in which ids are unique", + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "id" : { + "description" : "value must be an integer.", + "type" : "integer" + }, + "name" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "id", "name" ] + } + }, + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "caveats" : { + "type" : "string" + }, + "parameters" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" + }, + "dashcards" : { + "description" : "value must be seq of maps in which ids are unique", + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "col" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + }, + "id" : { + "type" : "integer" + }, + "inline_parameters" : { + "type" : "array", + "items" : { + "type" : "string", + "minLength" : 1 + } + }, + "parameter_mappings" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" + }, + "row" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + }, + "series" : { + "type" : "array", + "items" : { + "type" : "object" + } + }, + "size_x" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "size_y" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "id", "size_x", "size_y", "row", "col" ] + } + }, + "description" : { + "type" : "string" + } + } + } + } + } + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/{id}/cards" : { + "put" : { + "summary" : "PUT /api/dashboard/{id}/cards", + "description" : "(DEPRECATED -- Use the `PUT /api/dashboard/:id` endpoint instead.)\n Update `Cards` and `Tabs` on a Dashboard. Request body should have the form:\n\n {:cards [{:id ... ; DashboardCard ID\n :size_x ...\n :size_y ...\n :row ...\n :col ...\n :parameter_mappings ...\n :series [{:id 123\n ...}]}\n ...]\n :tabs [{:id ... ; DashboardTab ID\n :name ...}]}", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "cards" : { + "description" : "value must be seq of maps in which ids are unique", + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "col" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + }, + "id" : { + "type" : "integer" + }, + "inline_parameters" : { + "type" : "array", + "items" : { + "type" : "string", + "minLength" : 1 + } + }, + "parameter_mappings" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" + }, + "row" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + }, + "series" : { + "type" : "array", + "items" : { + "type" : "object" + } + }, + "size_x" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "size_y" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "id", "size_x", "size_y", "row", "col" ] + } + }, + "tabs" : { + "description" : "value must be seq of maps in which ids are unique", + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "id" : { + "description" : "value must be an integer.", + "type" : "integer" + }, + "name" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "id", "name" ] + } + } + }, + "required" : [ "cards" ] + } + } + } + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/{id}/items" : { + "get" : { + "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." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/{id}/params/{param-key}/remapping" : { + "get" : { + "summary" : "GET /api/dashboard/{id}/params/{param-key}/remapping", + "description" : "Fetch the remapped value for a given value of the parameter with ID `:param-key`.\n\n ;; fetch the remapped value for Dashboard 1 parameter 'abc' for value 100\n GET /api/dashboard/1/params/abc/remapping?value=100", + "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, + "schema" : { + "type" : "string" + } + }, { + "in" : "query", + "name" : "value", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/{id}/params/{param-key}/search/{query}" : { + "get" : { + "summary" : "GET /api/dashboard/{id}/params/{param-key}/search/{query}", + "description" : "Fetch possible values of the parameter whose ID is `:param-key` that contain `:query`. Optionally restrict\n these values by passing query parameters like `other-parameter=value` e.g.\n\n ;; fetch values for Dashboard 1 parameter 'abc' that contain 'Cam' and are possible when parameter 'def' is set\n ;; to 100\n GET /api/dashboard/1/params/abc/search/Cam?def=100\n\n Currently limited to first 1000 results.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "query", + "required" : true, + "schema" : { + "type" : "string", + "minLength" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/{id}/params/{param-key}/values" : { + "get" : { + "summary" : "GET /api/dashboard/{id}/params/{param-key}/values", + "description" : "Fetch possible values of the parameter whose ID is `:param-key`. If the values come directly from a query, optionally\n restrict these values by passing query parameters like `other-parameter=value` e.g.\n\n ;; fetch values for Dashboard 1 parameter 'abc' that are possible when parameter 'def' is set to 100\n GET /api/dashboard/1/params/abc/values?def=100", + "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/dashboard" ] + } + }, + "/api/dashboard/{id}/query_metadata" : { + "get" : { + "summary" : "GET /api/dashboard/{id}/query_metadata", + "description" : "Get all of the required query metadata for the cards on dashboard.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "anyOf" : [ { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, { + "description" : "String must be a valid 21-character NanoID string.", + "type" : "string", + "pattern" : "^[A-Za-z0-9_\\-]{21}$" + } ] + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/{id}/related" : { + "get" : { + "summary" : "GET /api/dashboard/{id}/related", + "description" : "Return related entities.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/database/" : { + "get" : { + "summary" : "GET /api/database/", + "description" : "Fetch all `Databases`.\n\n * `include=tables` means we should hydrate the Tables belonging to each DB. Default: `false`.\n\n * `saved` means we should include the saved questions virtual database. Default: `false`.\n\n * `include_editable_data_model` will only include DBs for which the current user has data model editing\n permissions. (If `include=tables`, this also applies to the list of tables in each DB). Should only be used if\n Enterprise Edition code is available the advanced-permissions feature is enabled.\n\n * `exclude_uneditable_details` will only include DBs for which the current user can edit the DB details. Has no\n effect unless Enterprise Edition code is available and the advanced-permissions feature is enabled.\n\n * `include_only_uploadable` will only include DBs into which Metabase can insert new data.\n\n Independently of these flags, the implementation of [[metabase.models.interface/to-json]] for `:model/Database` in\n [[metabase.warehouses.models.database]] uses the implementation of [[metabase.models.interface/can-write?]] for\n `:model/Database` in [[metabase.warehouses.models.database]] to exclude the `details` field, if the requesting user\n lacks permission to change the database details.", + "parameters" : [ { + "in" : "query", + "name" : "include", + "required" : false, + "schema" : { + "const" : "tables" + }, + "description" : "include must be either empty or the value 'tables'" + }, { + "in" : "query", + "name" : "include_analytics", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "saved", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "include_editable_data_model", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "exclude_uneditable_details", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "include_only_uploadable", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "router_database_id", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + }, + "post" : { + "summary" : "POST /api/database/", + "description" : "Add a new `Database`.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "provider_name" : { + "type" : "string" + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "is_on_demand" : { + "type" : "boolean", + "default" : false + }, + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "engine" : { + "description" : "value must be a valid database engine.", + "type" : "string", + "minLength" : 1 + }, + "details" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "is_full_sync" : { + "type" : "boolean", + "default" : true + }, + "connection_source" : { + "type" : "string", + "enum" : [ "admin", "setup" ], + "default" : "admin" + }, + "auto_run_queries" : { + "type" : "boolean" + }, + "schedules" : { + "$ref" : "#/components/schemas/metabase.sync.schedules.ExpandedSchedulesMap" + } + }, + "required" : [ "name", "engine", "details" ] + } + } + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/sample_database" : { + "post" : { + "summary" : "POST /api/database/sample_database", + "description" : "Add the sample database as a new `Database`.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/validate" : { + "post" : { + "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" : { + "details" : { + "type" : "object", + "properties" : { } + }, + "engine" : { + "description" : "value must be a valid database engine.", + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "engine", "details" ] + } + }, + "required" : [ "details" ] + } + } + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}" : { + "get" : { + "summary" : "GET /api/database/{id}", + "description" : "Get a single Database with `id`. Optionally pass `?include=tables` or `?include=tables.fields` to include the Tables\n belonging to this database, or the Tables and Fields, respectively. If the requestor has write permissions for the\n DB\n (i.e. is an admin or has data model permissions), then certain inferred secret values will also be included in the\n returned details (see [[metabase.secrets.models.secret/expand-db-details-inferred-secret-values]] for full details).\n\n Passing include_editable_data_model will only return tables for which the current user has data model editing\n permissions, if Enterprise Edition code is available and a token with the advanced-permissions feature is present.\n In addition, if the user has no data access for the DB (aka block permissions), it will return only the DB name, ID\n and tables, with no additional metadata.\n\n Independently of these flags, the implementation of [[metabase.models.interface/to-json]] for `:model/Database` in\n [[metabase.warehouses.models.database]] uses the implementation of [[metabase.models.interface/can-write?]] for `:model/Database`\n in [[metabase.warehouses.models.database]] to exclude the `details` field, if the requesting user lacks permission to change the\n database details.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "include", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "tables", "tables.fields" ] + } + }, { + "in" : "query", + "name" : "include_editable_data_model", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "in" : "query", + "name" : "exclude_uneditable_details", + "required" : false, + "schema" : { + "type" : "boolean" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + }, + "put" : { + "summary" : "PUT /api/database/{id}", + "description" : "Update a `Database`.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "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" : { + "type" : "string" + }, + "provider_name" : { + "type" : "string" + }, + "settings" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "engine" : { + "description" : "value must be a valid database engine.", + "type" : "string", + "minLength" : 1 + }, + "details" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "auto_run_queries" : { + "type" : "boolean" + }, + "caveats" : { + "type" : "string" + }, + "refingerprint" : { + "type" : "boolean" + }, + "schedules" : { + "$ref" : "#/components/schemas/metabase.sync.schedules.ExpandedSchedulesMap" + }, + "description" : { + "type" : "string" + } + } + } + } + } + }, + "tags" : [ "/api/database" ] + }, + "delete" : { + "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." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/autocomplete_suggestions" : { + "get" : { + "summary" : "GET /api/database/{id}/autocomplete_suggestions", + "description" : "Return a list of autocomplete suggestions for a given `prefix`, or `substring`. Should only specify one, but\n `substring` will have priority if both are present.\n\n This is intended for use with the ACE Editor when the User is typing raw SQL. Suggestions include matching `Tables`\n and `Fields` in this `Database`.\n\n Tables are returned in the format `[table_name \"Table\"]`;\n When Fields have a semantic_type, they are returned in the format `[field_name \"table_name base_type semantic_type\"]`\n When Fields lack a semantic_type, they are returned in the format `[field_name \"table_name base_type\"]`", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "prefix", + "required" : false, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "query", + "name" : "substring", + "required" : false, + "schema" : { + "type" : "string", + "minLength" : 1 + } + } ], + "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" : { + "summary" : "GET /api/database/{id}/card_autocomplete_suggestions", + "description" : "Return a list of `Card` autocomplete suggestions for a given `query` in a given `Database`.\n\n This is intended for use with the ACE Editor when the User is typing in a template tag for a `Card`, e.g. {{#...}}.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "query", + "required" : true, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "query", + "name" : "include_dashboard_questions", + "required" : false, + "schema" : { + "type" : "boolean" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/discard_values" : { + "post" : { + "summary" : "POST /api/database/{id}/discard_values", + "description" : "Discards all saved field values for this `Database`.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/dismiss_spinner" : { + "post" : { + "summary" : "POST /api/database/{id}/dismiss_spinner", + "description" : "Manually set the initial sync status of the `Database` and corresponding\n tables to be `complete` (see #20863)", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/fields" : { + "get" : { + "summary" : "GET /api/database/{id}/fields", + "description" : "Get a list of all `Fields` in `Database`.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/healthcheck" : { + "get" : { + "summary" : "GET /api/database/{id}/healthcheck", + "description" : "Reports whether the database can currently connect", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/idfields" : { + "get" : { + "summary" : "GET /api/database/{id}/idfields", + "description" : "Get a list of all primary key `Fields` for `Database`.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/metadata" : { + "get" : { + "summary" : "GET /api/database/{id}/metadata", + "description" : "Get metadata about a `Database`, including all of its `Tables` and `Fields`. Returns DB, fields, and field values.\n By default only non-hidden tables and fields are returned. Passing include_hidden=true includes them.\n\n Passing include_editable_data_model will only return tables for which the current user has data model editing\n permissions, if Enterprise Edition code is available and a token with the advanced-permissions feature is present.\n In addition, if the user has no data access for the DB (aka block permissions), it will return only the DB name, ID\n and tables, with no additional metadata.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "include_hidden", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "include_editable_data_model", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "remove_inactive", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "skip_fields", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/rescan_values" : { + "post" : { + "summary" : "POST /api/database/{id}/rescan_values", + "description" : "Trigger a manual scan of the field values for this `Database`.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/schema/" : { + "get" : { + "summary" : "GET /api/database/{id}/schema/", + "description" : "Return a list of Tables for a Database whose `schema` is `nil` or an empty string.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "include_hidden", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "include_editable_data_model", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/schema/{schema}" : { + "get" : { + "summary" : "GET /api/database/{id}/schema/{schema}", + "description" : "Returns a list of Tables for the given Database `id` and `schema`", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "include_hidden", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "include_editable_data_model", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/schemas" : { + "get" : { + "summary" : "GET /api/database/{id}/schemas", + "description" : "Returns a list of all the schemas with tables found for the database `id`. Excludes schemas with no tables.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "include_editable_data_model", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "include_hidden", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/settings-available" : { + "get" : { + "summary" : "GET /api/database/{id}/settings-available", + "description" : "Get all database-local settings and their availability for the given database.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "map where {:settings -> to , :reasons (optional) -> , :type -> , :message -> }>}>>}", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "settings" : { + "$ref" : "#/components/schemas/metabase.warehouses.api.available-settings" + } + }, + "required" : [ "settings" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/sync_schema" : { + "post" : { + "summary" : "POST /api/database/{id}/sync_schema", + "description" : "Trigger a manual update of the schema metadata for this `Database`.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/syncable_schemas" : { + "get" : { + "summary" : "GET /api/database/{id}/syncable_schemas", + "description" : "Returns a list of all syncable schemas found for the database `id`.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/usage_info" : { + "get" : { + "summary" : "GET /api/database/{id}/usage_info", + "description" : "Get usage info for a database.\n Returns a map with keys are models and values are the number of entities that use this database.", + "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/database" ] + } + }, + "/api/database/{virtual-db}/datasets" : { + "get" : { + "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" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{virtual-db}/datasets/{schema}" : { + "get" : { + "summary" : "GET /api/database/{virtual-db}/datasets/{schema}", + "description" : "Returns a list of Tables for the datasets virtual database.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{virtual-db}/metadata" : { + "get" : { + "summary" : "GET /api/database/{virtual-db}/metadata", + "description" : "Endpoint that provides metadata for the Saved Questions 'virtual' database. Used for fooling the frontend\n and allowing it to treat the Saved Questions virtual DB just like any other database.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{virtual-db}/schema/{schema}" : { + "get" : { + "summary" : "GET /api/database/{virtual-db}/schema/{schema}", + "description" : "Returns a list of Tables for the saved questions virtual database.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{virtual-db}/schemas" : { + "get" : { + "summary" : "GET /api/database/{virtual-db}/schemas", + "description" : "Returns a list of all the schemas found for the saved questions virtual database.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/dataset/" : { + "post" : { + "summary" : "POST /api/dataset/", + "description" : "Execute a query and retrieve the results in the usual format. The query will not use the cache.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "database" : { + "type" : "integer" + } + } + } + } + } + }, + "tags" : [ "/api/dataset" ] + } + }, + "/api/dataset/native" : { + "post" : { + "summary" : "POST /api/dataset/native", + "description" : "Fetch a native version of an MBQL query.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "database" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "pretty" : { + "type" : "boolean", + "default" : true + } + }, + "required" : [ "database" ] + } + } + } + }, + "tags" : [ "/api/dataset" ] + } + }, + "/api/dataset/parameter/remapping" : { + "post" : { + "summary" : "POST /api/dataset/parameter/remapping", + "description" : "Return the remapped parameter values for cards or dashboards that are being edited.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "field_ids" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + } + }, + "parameter" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter" + }, + "value" : { } + }, + "required" : [ "parameter", "value" ] + } + } + } + }, + "tags" : [ "/api/dataset" ] + } + }, + "/api/dataset/parameter/search/{query}" : { + "post" : { + "summary" : "POST /api/dataset/parameter/search/{query}", + "description" : "Return parameter values for cards or dashboards that are being edited. Expects a query string at `?query=foo`.", + "parameters" : [ { + "in" : "path", + "name" : "query", + "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" : { + "field_ids" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + } + }, + "parameter" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter" + } + }, + "required" : [ "parameter" ] + } + } + } + }, + "tags" : [ "/api/dataset" ] + } + }, + "/api/dataset/parameter/values" : { + "post" : { + "summary" : "POST /api/dataset/parameter/values", + "description" : "Return parameter values for cards or dashboards that are being edited.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "field_ids" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + } + }, + "parameter" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter" + } + }, + "required" : [ "parameter" ] + } + } + } + }, + "tags" : [ "/api/dataset" ] + } + }, + "/api/dataset/pivot" : { + "post" : { + "summary" : "POST /api/dataset/pivot", + "description" : "Generate a pivoted dataset for an ad-hoc query", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "database" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "database" ] + } + } + } + }, + "tags" : [ "/api/dataset" ] + } + }, + "/api/dataset/query_metadata" : { + "post" : { + "summary" : "POST /api/dataset/query_metadata", + "description" : "Get all of the required query metadata for an ad-hoc query.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "database" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "database" ] + } + } + } + }, + "tags" : [ "/api/dataset" ] + } + }, + "/api/dataset/{export-format}" : { + "post" : { + "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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "format_rows" : { + "default" : false, + "type" : "boolean" + }, + "pivot_results" : { + "default" : false, + "type" : "boolean" + }, + "query" : { + "type" : "object", + "properties" : { } + }, + "visualization_settings" : { + "default" : { }, + "type" : "object", + "properties" : { } + } + }, + "required" : [ "query", "visualization_settings", "format_rows", "pivot_results" ] + } + } + } + }, + "tags" : [ "/api/dataset" ] + } + }, + "/api/ee/action-v2/execute" : { + "post" : { + "summary" : "POST /api/ee/action-v2/execute", + "description" : "Execute an action with a single input.\n\n Takes:\n - `action` - an identifier or an expression for what we want to execute.\n - `scope` - where the action is being invoked from.\n - `input` - a single map. currently these are typically a database table row pk, or query result.\n - `params` (optional) - a map of values for the parameters taken by the action's mapping.\n\n The `input` and `params` are used by the relevant mapping to calculate a map argument to the underlying action fn.\n If there is no mapping, `params` are simply used as overrides for `input`.\n\n Returns the outputs from the performed action.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "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/ee/action-v2" ] + } + }, + "/api/ee/action-v2/execute-bulk" : { + "post" : { + "summary" : "POST /api/ee/action-v2/execute-bulk", + "description" : "Execute an action with multiple inputs.\n\n This is typically more efficient than calling execute with each input individually, for example by performing batch\n SQL operations.\n\n Takes:\n - `action` - an identifier or an expression for what we want to execute.\n - `scope` - where the action is being invoked from.\n - `inputs` - a list of maps. currently these are typically a database table row pk, or query result.\n - `params` (optional) - a map of values for the parameters taken by the action's mapping.\n\n The `inputs` and `params` are used by the relevant mapping to calculate a list of args for the underlying action fn.\n If there is no mapping, `params` are simply used as overrides for each map within `inputs`.\n\n Returns the outputs from the performed action.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "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" ] + } + }, + "/api/ee/action-v2/execute-form" : { + "post" : { + "summary" : "POST /api/ee/action-v2/execute-form", + "description" : "Temporary endpoint for describing an actions parameters\n such that they can be presented correctly in a modal ahead of execution.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/action-v2" ] + } + }, + "/api/ee/advanced-permissions/application/graph" : { + "get" : { + "summary" : "GET /api/ee/advanced-permissions/application/graph", + "description" : "Fetch a graph of Application Permissions.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/advanced-permissions/application" ] + }, + "put" : { + "summary" : "PUT /api/ee/advanced-permissions/application/graph", + "description" : "Do a batch update of Application Permissions by passing a modified graph.", + "parameters" : [ { + "in" : "query", + "name" : "skip-graph", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "force", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { } + } + } + } + }, + "tags" : [ "/api/ee/advanced-permissions/application" ] + } + }, + "/api/ee/advanced-permissions/impersonation/" : { + "get" : { + "summary" : "GET /api/ee/advanced-permissions/impersonation/", + "description" : "Fetch a list of all Impersonation policies currently in effect, or a single policy if both `group_id` and `db_id`\n are provided.", + "parameters" : [ { + "in" : "query", + "name" : "group_id", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "db_id", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "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/advanced-permissions/impersonation/{id}" : { + "delete" : { + "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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/advanced-permissions/impersonation" ] + } + }, + "/api/ee/ai-entity-analysis/analyze-chart" : { + "post" : { + "summary" : "POST /api/ee/ai-entity-analysis/analyze-chart", + "description" : "Analyze a chart image using an AI vision model. This function sends the image data to a separate external AI service for analysis.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "image_base64" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "timeline_events" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "timestamp" : { + "type" : "string" + } + }, + "required" : [ "name", "timestamp" ] + } + } + }, + "required" : [ "image_base64" ] + } + } + } + }, + "tags" : [ "/api/ee/ai-entity-analysis" ] + } + }, + "/api/ee/ai-sql-fixer/fix" : { + "post" : { + "summary" : "POST /api/ee/ai-sql-fixer/fix", + "description" : "Suggest fixes for a SQL query.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "error_message" : { + "type" : "string" + }, + "query" : { + "type" : "object", + "properties" : { + "database" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "database" ] + } + }, + "required" : [ "query", "error_message" ] + } + } + } + }, + "tags" : [ "/api/ee/ai-sql-fixer" ] + } + }, + "/api/ee/ai-sql-generation/generate" : { + "post" : { + "summary" : "POST /api/ee/ai-sql-generation/generate", + "description" : "Generate a SQL query.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "database_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "prompt" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "prompt", "database_id" ] + } + } + } + }, + "tags" : [ "/api/ee/ai-sql-generation" ] + } + }, + "/api/ee/audit-app/user/audit-info" : { + "get" : { + "summary" : "GET /api/ee/audit-app/user/audit-info", + "description" : "Gets audit info for the current user if he has permissions to access the audit collection.\n Otherwise return an empty map.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/audit-app/user" ] + } + }, + "/api/ee/audit-app/user/{id}/subscriptions" : { + "delete" : { + "summary" : "DELETE /api/ee/audit-app/user/{id}/subscriptions", + "description" : "Delete all Alert and DashboardSubscription subscriptions for a User (i.e., so they will no longer receive them).\n Archive all Alerts and DashboardSubscriptions created by the User. Only allowed for admins or for the current user.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/audit-app/user" ] + } + }, + "/api/ee/autodescribe/card/summarize" : { + "post" : { + "summary" : "POST /api/ee/autodescribe/card/summarize", + "description" : "Summarize a question.", + "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" : { } + }, + "dataset" : { + "type" : "boolean" + }, + "dataset_query" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "parameter_mappings" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mapping" + } + }, + "collection_position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "result_metadata" : { + "$ref" : "#/components/schemas/metabase.analyze.query-results.ResultsMetadata" + }, + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "display" : { + "type" : "string", + "minLength" : 1 + }, + "parameters" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter" + } + }, + "description" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "dataset_query", "display", "visualization_settings" ] + } + } + } + }, + "tags" : [ "/api/ee/autodescribe" ] + } + }, + "/api/ee/autodescribe/dashboard/summarize/{id}" : { + "post" : { + "summary" : "POST /api/ee/autodescribe/dashboard/summarize/{id}", + "description" : "Provide a summary of a dashboard.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/autodescribe" ] + } + }, + "/api/ee/billing/" : { + "get" : { + "summary" : "GET /api/ee/billing/", + "description" : "Get billing information. This acts as a proxy between `metabase-billing-info-url` and the client,\n using the embedding token and signed in user's email to fetch the billing information.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/billing" ] + } + }, + "/api/ee/cloud-add-ons/{product-type}" : { + "post" : { + "summary" : "POST /api/ee/cloud-add-ons/{product-type}", + "description" : "Purchase an add-on.", + "parameters" : [ { + "in" : "path", + "name" : "product-type", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "metabase-ai" ] + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "terms_of_service" : { + "type" : "boolean" + } + }, + "required" : [ "terms_of_service" ] + } + } + } + }, + "tags" : [ "/api/ee/cloud-add-ons" ] + } + }, + "/api/ee/comment/" : { + "get" : { + "summary" : "GET /api/ee/comment/", + "description" : "Get comments for an entity", + "parameters" : [ { + "in" : "query", + "name" : "target_type", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "document" ] + } + }, { + "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/ee/comment" ] + }, + "post" : { + "summary" : "POST /api/ee/comment/", + "description" : "Create a new comment", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "child_target_id" : { + "type" : "string" + }, + "content" : { + "type" : "object" + }, + "html" : { + "type" : "string" + }, + "parent_comment_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "target_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "target_type" : { + "type" : "string", + "enum" : [ "document" ] + } + }, + "required" : [ "target_type", "target_id", "content", "html" ] + } + } + } + }, + "tags" : [ "/api/ee/comment" ] + } + }, + "/api/ee/comment/mentions" : { + "get" : { + "summary" : "GET /api/ee/comment/mentions", + "description" : "Get a list of entities suitable for mentions. NOTE: only users for now.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/comment" ] + } + }, + "/api/ee/comment/{comment-id}" : { + "put" : { + "summary" : "PUT /api/ee/comment/{comment-id}", + "description" : "Update a comment", + "parameters" : [ { + "in" : "path", + "name" : "comment-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "content" : { + "type" : "object" + }, + "html" : { + "type" : "string" + }, + "is_resolved" : { + "type" : "boolean" + } + } + } + } + } + }, + "tags" : [ "/api/ee/comment" ] + }, + "delete" : { + "summary" : "DELETE /api/ee/comment/{comment-id}", + "description" : "Soft delete a comment", + "parameters" : [ { + "in" : "path", + "name" : "comment-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/comment" ] + } + }, + "/api/ee/comment/{comment-id}/reaction" : { + "post" : { + "summary" : "POST /api/ee/comment/{comment-id}/reaction", + "description" : "Toggle a reaction on a comment", + "parameters" : [ { + "in" : "path", + "name" : "comment-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "emoji" : { + "type" : "string", + "minLength" : 1, + "maxLength" : 10 + } + }, + "required" : [ "emoji" ] + } + } + } + }, + "tags" : [ "/api/ee/comment" ] + } + }, + "/api/ee/content-translation/csv" : { + "get" : { + "summary" : "GET /api/ee/content-translation/csv", + "description" : "Provides content translation dictionary in CSV", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/content-translation" ] + } + }, + "/api/ee/content-translation/dictionary/{token}" : { + "get" : { + "summary" : "GET /api/ee/content-translation/dictionary/{token}", + "description" : "Fetch the content translation dictionary via a JSON Web Token signed with the `embedding-secret-key`.", + "parameters" : [ { + "in" : "path", + "name" : "token", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/content-translation" ] + } + }, + "/api/ee/content-translation/upload-dictionary" : { + "post" : { + "summary" : "POST /api/ee/content-translation/upload-dictionary", + "description" : "Upload a CSV of content translations", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "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" ] + } + }, + "/api/ee/database-replication/connection/{database-id}" : { + "post" : { + "summary" : "POST /api/ee/database-replication/connection/{database-id}", + "description" : "Create a new PG replication connection for the specified database.", + "parameters" : [ { + "in" : "path", + "name" : "database-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "replicationSchemaFilters" : { + "type" : "object", + "properties" : { + "schema-filters-patterns" : { + "type" : "string" + }, + "schema-filters-type" : { + "type" : "string", + "enum" : [ "inclusion", "exclusion", "all" ] + } + }, + "required" : [ "schema-filters-type", "schema-filters-patterns" ] + } + } + } + } + } + }, + "tags" : [ "/api/ee/database-replication" ] + }, + "delete" : { + "summary" : "DELETE /api/ee/database-replication/connection/{database-id}", + "description" : "Delete PG replication connection for the specified database.", + "parameters" : [ { + "in" : "path", + "name" : "database-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/database-replication" ] + } + }, + "/api/ee/database-replication/connection/{database-id}/preview" : { + "post" : { + "summary" : "POST /api/ee/database-replication/connection/{database-id}/preview", + "description" : "Return info about pg-replication connection that is about to be created.", + "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" + } + }, + "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" ] + } + }, + "/api/ee/database-routing/destination-database" : { + "post" : { + "summary" : "POST /api/ee/database-routing/destination-database", + "description" : "Create new Destination Databases.\n\n Note that unlike the normal `POST /api/database` endpoint, does NOT check the details before adding the Database.\n\n This is OK, it's not an invariant that all database details are always valid, but it's something to note.", + "parameters" : [ { + "in" : "query", + "name" : "check_connection_details", + "required" : false, + "schema" : { + "type" : "boolean" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "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" ] + } + }, + "router_database_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "router_database_id", "destinations" ] + } + } + } + }, + "tags" : [ "/api/ee/database-routing" ] + } + }, + "/api/ee/database-routing/router-database/{id}" : { + "put" : { + "summary" : "PUT /api/ee/database-routing/router-database/{id}", + "description" : "Updates an existing Database with the `user_attribute` to route on. Will either:\n - turn an existing Database into a Router database\n - change the `user_attribute` used to route for an existing Router database, or\n - turn a Router database into a regular Database\n depending on the value of `user_attribute`", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "user_attribute" : { + "type" : "string", + "minLength" : 1 + } + } + } + } + } + }, + "tags" : [ "/api/ee/database-routing" ] + } + }, + "/api/ee/dependencies/check_card" : { + "post" : { + "summary" : "POST /api/ee/dependencies/check_card", + "description" : "Check a proposed edit to a card, and return the card IDs for those cards this edit will break.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.card-body" + } + } + } + }, + "tags" : [ "/api/ee/dependencies" ] + } + }, + "/api/ee/dependencies/check_snippet" : { + "post" : { + "summary" : "POST /api/ee/dependencies/check_snippet", + "description" : "Check a proposed edit to a native snippet, and return the cards, etc. which will be broken.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "content" : { + "type" : "string" + }, + "id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "name" : { + "description" : "snippet names cannot include '}' or start with spaces" + } + }, + "required" : [ "id" ] + } + } + } + }, + "tags" : [ "/api/ee/dependencies" ] + } + }, + "/api/ee/dependencies/check_transform" : { + "post" : { + "summary" : "POST /api/ee/dependencies/check_transform", + "description" : "Check a proposed edit to a transform, and return the card, transform, etc. IDs for things that will break.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.transform-body" + } + } + } + }, + "tags" : [ "/api/ee/dependencies" ] + } + }, + "/api/ee/dependencies/graph" : { + "get" : { + "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" : { + "type" : "string", + "enum" : [ "table", "card", "snippet", "transform", "dashboard", "document", "sandbox" ] + } + }, { + "in" : "query", + "name" : "archived", + "required" : false, + "schema" : { + "type" : "boolean" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/dependencies" ] + } + }, + "/api/ee/dependencies/graph/dependents" : { + "get" : { + "summary" : "GET /api/ee/dependencies/graph/dependents", + "description" : "This endpoint takes an :id, :type, :dependent_type, and an optional :dependent_card_type, and returns a list of\n all that entity's dependents with :dependent_type. If the :dependent_type is :card, the dependents are further\n filtered by :dependent_card_type.\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" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "type", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "table", "card", "snippet", "transform", "dashboard", "document", "sandbox" ] + } + }, { + "in" : "query", + "name" : "dependent_type", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "table", "card", "snippet", "transform", "dashboard", "document", "sandbox" ] + } + }, { + "in" : "query", + "name" : "dependent_card_type", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "question", "model", "metric" ] + } + }, { + "in" : "query", + "name" : "archived", + "required" : false, + "schema" : { + "type" : "boolean" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/dependencies" ] + } + }, + "/api/ee/document/" : { + "get" : { + "summary" : "GET /api/ee/document/", + "description" : "Gets existing `Documents`.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/document" ] + }, + "post" : { + "summary" : "POST /api/ee/document/", + "description" : "Create a new `Document`.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "cards" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "properties" : { + "visualization_settings" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "entity_id" : { + "type" : "string", + "minLength" : 1 + }, + "dataset_query" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "parameter_mappings" : { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "result_metadata" : { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "display" : { + "type" : "string", + "minLength" : 1 + }, + "parameters" : { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, + "description" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "name", "dataset_query", "display", "visualization_settings" ] + } + }, + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "collection_position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "document" : { }, + "name" : { + "type" : "string", + "minLength" : 1, + "maxLength" : 254 + } + }, + "required" : [ "name", "document" ] + } + } + } + }, + "tags" : [ "/api/ee/document" ] + } + }, + "/api/ee/document/public" : { + "get" : { + "summary" : "GET /api/ee/document/public", + "description" : "List all Documents that have public links.\n\n Returns a sequence of Documents that have been publicly shared. Each Document includes its `:id`, `:name`,\n and `:public_uuid`. Documents are only actually accessible via the public endpoint if public sharing is\n currently enabled. Archived Documents are excluded from the results.\n\n This endpoint is used to populate the public links listing in the Admin settings UI.\n\n Requires superuser permissions. Public sharing must be enabled via the `enable-public-sharing` setting.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "sequence of map where {:name -> , :id -> , :public_uuid -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "name" : { + "type" : "string" + }, + "public_uuid" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "name", "id", "public_uuid" ] + } + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/document" ] + } + }, + "/api/ee/document/{document-id}" : { + "get" : { + "summary" : "GET /api/ee/document/{document-id}", + "description" : "Returns an existing Document by ID.", + "parameters" : [ { + "in" : "path", + "name" : "document-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/document" ] + }, + "put" : { + "summary" : "PUT /api/ee/document/{document-id}", + "description" : "Updates an existing `Document`.", + "parameters" : [ { + "in" : "path", + "name" : "document-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "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" : { + "archived" : { + "type" : "boolean" + }, + "cards" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "properties" : { + "visualization_settings" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "entity_id" : { + "type" : "string", + "minLength" : 1 + }, + "dataset_query" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "parameter_mappings" : { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "result_metadata" : { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "display" : { + "type" : "string", + "minLength" : 1 + }, + "parameters" : { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, + "description" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "name", "dataset_query", "display", "visualization_settings" ] + } + }, + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "collection_position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "document" : { }, + "name" : { + "type" : "string", + "minLength" : 1, + "maxLength" : 254 + } + } + } + } + } + }, + "tags" : [ "/api/ee/document" ] + }, + "delete" : { + "summary" : "DELETE /api/ee/document/{document-id}", + "description" : "Permanently deletes an archived Document.", + "parameters" : [ { + "in" : "path", + "name" : "document-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/document" ] + } + }, + "/api/ee/document/{document-id}/card/{card-id}/query/{export-format}" : { + "post" : { + "summary" : "POST /api/ee/document/{document-id}/card/{card-id}/query/{export-format}", + "description" : "Download query results for a Card embedded in a Document.\n\n Returns query results in the requested format. The user must have read access to the document\n to download results. If the card's query fails, standard query error responses are returned.\n\n Route parameters:\n - document-id: ID of the document containing the card\n - card-id: ID of the card to download results from\n - export-format: Output format (csv, xlsx, json)\n\n Body parameters (snake_case):\n - parameters: Optional query parameters (array of maps or JSON string)\n - format_rows: Whether to apply formatting to results (boolean, default false)\n - pivot_results: Whether to pivot results (boolean, default false)", + "parameters" : [ { + "in" : "path", + "name" : "document-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" : { + "type" : "string" + } + } ], + "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" : { + "anyOf" : [ { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, { + "description" : "value must be a valid JSON string.", + "type" : "string" + } ] + }, + "pivot_results" : { + "default" : false, + "type" : "boolean" + } + }, + "required" : [ "format_rows", "pivot_results" ] + } + } + } + }, + "tags" : [ "/api/ee/document" ] + } + }, + "/api/ee/document/{document-id}/public-link" : { + "post" : { + "summary" : "POST /api/ee/document/{document-id}/public-link", + "description" : "Generate a publicly-accessible UUID for a Document.\n\n Creates a public link that allows viewing the Document without authentication. If the Document already has\n a public UUID, returns the existing one rather than generating a new one. This enables sharing the Document\n via `GET /api/ee/public/document/:uuid`.\n\n Returns a map containing `:uuid` (the public UUID string).\n\n Requires superuser permissions. Public sharing must be enabled via the `enable-public-sharing` setting.", + "parameters" : [ { + "in" : "path", + "name" : "document-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "map where {:uuid -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "uuid" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "uuid" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/document" ] + }, + "delete" : { + "summary" : "DELETE /api/ee/document/{document-id}/public-link", + "description" : "Remove the public link for a Document.\n\n Deletes the public UUID from the Document, making it no longer accessible via the public sharing endpoint.\n This revokes public access to the Document - the existing public link will no longer work.\n\n Returns a 204 No Content response on success.\n\n Requires superuser permissions. Public sharing must be enabled via the `enable-public-sharing` setting.\n Throws a 404 if the Document doesn't exist, is archived, or doesn't have a public link.", + "parameters" : [ { + "in" : "path", + "name" : "document-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/document" ] + } + }, + "/api/ee/email/override" : { + "put" : { + "summary" : "PUT /api/ee/email/override", + "description" : "Update multiple cloud email Settings. You must be a superuser or have `setting` permission to do this.\n Calling this automatically sets `cloud-smtp-enabled` to true if the settings are valid.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "email-smtp-host-override" : { + "anyOf" : [ { + "type" : "string" + }, { + "type" : "null" + } ] + }, + "email-smtp-password-override" : { + "anyOf" : [ { + "type" : "string" + }, { + "type" : "null" + } ] + }, + "email-smtp-port-override" : { + "anyOf" : [ { + "type" : "integer" + }, { + "type" : "null" + } ] + }, + "email-smtp-security-override" : { + "anyOf" : [ { + "type" : "string" + }, { + "type" : "null" + } ] + }, + "email-smtp-username-override" : { + "anyOf" : [ { + "type" : "string" + }, { + "type" : "null" + } ] + } + } + } + } + } + }, + "tags" : [ "/api/ee/email" ] + }, + "delete" : { + "summary" : "DELETE /api/ee/email/override", + "description" : "Clear all cloud email related settings. You must be a superuser or have `setting` permission to do this.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/email" ] + } + }, + "/api/ee/embedding-hub/checklist" : { + "get" : { + "summary" : "GET /api/ee/embedding-hub/checklist", + "description" : "Get the embedding hub checklist status, indicating which setup steps have been completed.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/embedding-hub" ] + } + }, + "/api/ee/gsheets/connection" : { + "post" : { + "summary" : "POST /api/ee/gsheets/connection", + "description" : "Hook up a new google drive folder or sheet that will be watched and have its content ETL'd into Metabase.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:error -> , :message -> }, or one of , :created_at -> , :sync_started_at -> , :created_by_id -> , :db_id -> } | active = map where {:url -> , :created_at -> , :last_sync_at -> , :next_sync_at -> , :created_by_id -> , :db_id -> } | error = map where {:url -> , :created_at -> , :error_message -> , :created_by_id -> , :db_id -> }> dispatched by :status", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/gsheets.response" + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "url" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "url" ] + } + } + } + }, + "tags" : [ "/api/ee/gsheets" ] + }, + "get" : { + "summary" : "GET /api/ee/gsheets/connection", + "description" : "Check the status of a connection. This endpoint gets polled by FE to determine when to\n stop showing the setup widget.\n\n Returns the gsheets shape, with the attached datawarehouse db id at `:db_id`.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:error -> , :message -> }, or one of , :created_at -> , :sync_started_at -> , :created_by_id -> , :db_id -> } | active = map where {:url -> , :created_at -> , :last_sync_at -> , :next_sync_at -> , :created_by_id -> , :db_id -> } | error = map where {:url -> , :created_at -> , :error_message -> , :created_by_id -> , :db_id -> }> dispatched by :status", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/gsheets.response" + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/gsheets" ] + }, + "delete" : { + "summary" : "DELETE /api/ee/gsheets/connection", + "description" : "Disconnect the google service account. There is only one (or zero) at the time of writing.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/gsheets" ] + } + }, + "/api/ee/gsheets/connection/sync" : { + "post" : { + "summary" : "POST /api/ee/gsheets/connection/sync", + "description" : "Force a sync of the connection now.\n\n Returns the gsheets shape, with the attached datawarehouse db id at `:db_id`.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/gsheets" ] + } + }, + "/api/ee/gsheets/service-account" : { + "get" : { + "summary" : "GET /api/ee/gsheets/service-account", + "description" : "Checks to see if service-account is setup or not, delegates to HM only if we haven't set it from a metabase cluster\n before.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:email -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "email" : { + "type" : "string" + } + }, + "required" : [ ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/gsheets" ] + } + }, + "/api/ee/logs/query_execution/{yyyy-mm}" : { + "get" : { + "summary" : "GET /api/ee/logs/query_execution/{yyyy-mm}", + "description" : "Fetch rows for the month specified by `:yyyy-mm` from the query_execution logs table.\n Must be a superuser.", + "parameters" : [ { + "in" : "path", + "name" : "yyyy-mm", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "\\d{4}-\\d{2}" + }, + "description" : "Must be a string like 2020-04 or 2222-11." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/logs" ] + } + }, + "/api/ee/metabot-tools/answer-sources" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/answer-sources", + "description" : "Return top level meta information about available information sources.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.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}" + } + }, + "required" : [ "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/check-transform-dependencies" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/check-transform-dependencies", + "description" : "Check a proposed edit to a transform and return details of cards or transforms that would be broken by the change.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.check-transform-dependencies-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/create-dashboard-subscription" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/create-dashboard-subscription", + "description" : "Create a dashboard subscription.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:output -> , :conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "output" : { + "type" : "string" + } + }, + "required" : [ "output", "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.create-dashboard-subscription-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/field-values" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/field-values", + "description" : "Return statistics and/or values for a given field of a given entity.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.field-values-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/filter-records" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/filter-records", + "description" : "Construct a query from a metric.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.filter-records-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/find-outliers" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/find-outliers", + "description" : "Find outliers in the values provided by a data source for a given column.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.find-outliers-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/generate-insights" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/generate-insights", + "description" : "Generate insights.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:output -> , :reactions -> , :url -> }>, :conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "output" : { + "type" : "string" + }, + "reactions" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabot.reaction.redirect" + } + } + }, + "required" : [ "output", "reactions", "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.generate-insights-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/get-current-user" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-current-user", + "description" : "Get information about user that started the conversation.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.tool-request" + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/get-dashboard-details" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-dashboard-details", + "description" : "Get information about a given dashboard.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "type" : "object", + "properties" : { + "dashboard_id" : { + "type" : "integer" + } + }, + "required" : [ "dashboard_id" ] + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/get-document-details" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-document-details", + "description" : "Get information about a given report.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.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}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/get-metric-details" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-metric-details", + "description" : "Get information about a given metric.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-metric-details-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/get-query-details" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-query-details", + "description" : "Get information about a given query.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "type" : "object", + "properties" : { + "query" : { + "type" : "object", + "properties" : { } + } + }, + "required" : [ "query" ] + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/get-report-details" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-report-details", + "description" : "Get information about a given report.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-report-details-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/get-snippet-details" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-snippet-details", + "description" : "Get the content of a single SQL snippet.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Schema for SQL snippet detail results", + "content" : { + "application/json" : { + "schema" : { + "description" : "Schema for SQL snippet detail results", + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "structured_output" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.full-snippet" + } + }, + "required" : [ "structured_output", "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-snippet-details-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/get-snippets" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-snippets", + "description" : "Get a list of all known SQL snippets.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Schema for SQL snippet list results", + "content" : { + "application/json" : { + "schema" : { + "description" : "Schema for SQL snippet list results", + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "structured_output" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.basic-snippet" + } + } + }, + "required" : [ "structured_output", "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.tool-request" + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/get-table-details" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-table-details", + "description" : "Get information about a given table or model.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-table-details-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/get-tables" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-tables", + "description" : "Get information about the tables in a given database.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-tables-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/get-transform-details" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-transform-details", + "description" : "Get information about a transform.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-transform-details-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/get-transform-python-library-details" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-transform-python-library-details", + "description" : "Get information about a Python library by path.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-transform-python-library-details-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/get-transforms" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-transforms", + "description" : "Get a list of all known transforms.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.tool-request" + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/query-datasource" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/query-datasource", + "description" : "Construct a query from a model or table data source.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.query-datasource-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/query-metric" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/query-metric", + "description" : "Construct a query from a metric.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.query-metric-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/query-model" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/query-model", + "description" : "Construct a query from a model.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.query-model-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/search" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/search", + "description" : "Enhanced search with term and semantic queries using Reciprocal Rank Fusion.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.search-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/search_v2" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/search_v2", + "description" : "Enhanced search with term and semantic queries using Reciprocal Rank Fusion. This is identical to /search, but\n duplicated in order to add a new capability to AI service that indicates that Metabot can search transforms. The\n /search endpoint is kept around for backward compatibility.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.search-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-v3/agent-streaming" : { + "post" : { + "summary" : "POST /api/ee/metabot-v3/agent-streaming", + "description" : "Send a chat message to the LLM via the AI Proxy.", + "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" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.context.context" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "history" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.client.schema.messages" + }, + "message" : { + "type" : "string", + "minLength" : 1 + }, + "metabot_id" : { + "type" : "string" + }, + "profile_id" : { + "type" : "string" + }, + "state" : { + "type" : "object", + "properties" : { } + } + }, + "required" : [ "message", "context", "conversation_id", "state" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-v3" ] + } + }, + "/api/ee/metabot-v3/document/generate-content" : { + "post" : { + "summary" : "POST /api/ee/metabot-v3/document/generate-content", + "description" : "Create a new piece of content to insert into the document.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "instructions" : { + "type" : "string", + "minLength" : 1 + }, + "references" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, + "required" : [ "instructions" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-v3/document" ] + } + }, + "/api/ee/metabot-v3/feedback" : { + "post" : { + "summary" : "POST /api/ee/metabot-v3/feedback", + "description" : "Proxy Metabot feedback to Harbormaster, adding the premium embedding token.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { } + } + } + } + }, + "tags" : [ "/api/ee/metabot-v3" ] + } + }, + "/api/ee/metabot-v3/metabot/" : { + "get" : { + "summary" : "GET /api/ee/metabot-v3/metabot/", + "description" : "List configured metabot instances", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/metabot-v3/metabot" ] + } + }, + "/api/ee/metabot-v3/metabot/{id}" : { + "get" : { + "summary" : "GET /api/ee/metabot-v3/metabot/{id}", + "description" : "Retrieve one metabot instance", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/metabot-v3/metabot" ] + }, + "put" : { + "summary" : "PUT /api/ee/metabot-v3/metabot/{id}", + "description" : "Update a metabot instance", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "collection_id" : { + "type" : "integer", + "minimum" : 1 + }, + "use_verified_content" : { + "type" : "boolean" + } + }, + "additionalProperties" : false + } + } + } + }, + "tags" : [ "/api/ee/metabot-v3/metabot" ] + } + }, + "/api/ee/metabot-v3/metabot/{id}/prompt-suggestions" : { + "get" : { + "summary" : "GET /api/ee/metabot-v3/metabot/{id}/prompt-suggestions", + "description" : "Return the prompt suggestions for the metabot instance with `id`.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + }, { + "in" : "query", + "name" : "sample", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "in" : "query", + "name" : "model", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "metric", "model" ] + } + }, { + "in" : "query", + "name" : "model_id", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/metabot-v3/metabot" ] + }, + "delete" : { + "summary" : "DELETE /api/ee/metabot-v3/metabot/{id}/prompt-suggestions", + "description" : "Delete all prompt suggestions for the metabot instance with `id`.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/metabot-v3/metabot" ] + } + }, + "/api/ee/metabot-v3/metabot/{id}/prompt-suggestions/regenerate" : { + "post" : { + "summary" : "POST /api/ee/metabot-v3/metabot/{id}/prompt-suggestions/regenerate", + "description" : "Remove any existing prompt suggestions for the Metabot instance with `id` and generate new ones.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/metabot-v3/metabot" ] + } + }, + "/api/ee/metabot-v3/metabot/{id}/prompt-suggestions/{prompt-id}" : { + "delete" : { + "summary" : "DELETE /api/ee/metabot-v3/metabot/{id}/prompt-suggestions/{prompt-id}", + "description" : "Delete the prompt suggestion with ID `prompt-id` for the metabot instance with `id`.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + }, { + "in" : "path", + "name" : "prompt-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/metabot-v3/metabot" ] + } + }, + "/api/ee/permission_debug/" : { + "get" : { + "summary" : "GET /api/ee/permission_debug/", + "description" : "This endpoint expects a `user_id`, a `model_id` to debug permissions against, and `action_type`.\n The type of model we are debugging against is inferred by the `action_type`.\n\n It will return:\n - `decision`: The overall permission decision (\"allow\", \"denied\", or \"limited\")\n - `model-type`: The type of model being checked (e.g., \"question\")\n - `model-id`: The ID of the model being checked\n - `segment`: A set of segmentation types applied (e.g., \"sandboxed\", \"impersonated\", \"routed\")\n - `message`: A sequence of strings explaining the decision\n - `data`: A map containing details about permissions (table or collection names to group names)\n - `suggestions`: A map of group IDs to group names that could provide access\n\n Example requests:\n - Check if user can read a card: `GET /api/ee/permission_debug?user_id=123&model_id=456&action_type=card/read`\n - Check if user can query a card: `GET /api/ee/permission_debug?user_id=123&model_id=456&action_type=card/query`\n - Check if user can download data: `GET /api/ee/permission_debug?user_id=123&model_id=456&action_type=card/download-data`\n\n Example responses:\n - Allowed access:\n ```json\n {\n \"decision\": \"allow\",\n \"model-type\": \"question\",\n \"model-id\": \"456\",\n \"segment\": [],\n \"message\": [\"User has permission to read this card\"],\n \"data\": {},\n \"suggestions\": {}\n }\n ```\n - Denied access with blocked table:\n ```json\n {\n \"decision\": \"denied\",\n \"model-type\": \"question\",\n \"model-id\": \"456\",\n \"segment\": [],\n \"message\": [\"User does not have permission to query this card\"],\n \"data\": {\"sample-db.PUBLIC.ORDERS\": [\"All Users\"]},\n \"suggestions\": {}\n }\n ```\n - Limited access:\n ```json\n {\n \"decision\": \"limited\",\n \"model-type\": \"question\",\n \"model-id\": \"456\",\n \"segment\": [],\n \"message\": [\"User has permission to download some data from this card\"],\n \"data\": {},\n \"suggestions\": {}\n }\n ```", + "parameters" : [ { + "in" : "query", + "name" : "user_id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + }, { + "in" : "query", + "name" : "model_id", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "query", + "name" : "action_type", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "card/read", "card/query", "card/download-data" ] + } + } ], + "responses" : { + "2XX" : { + "description" : "map where {:model-type -> , :model-id -> , :decision -> , :segment -> , :message -> , :data -> , :suggestions -> to >}", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase-enterprise.permission-debug.impl.perm-debug-info" + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/permission_debug" ] + } + }, + "/api/ee/public/document/{uuid}" : { + "get" : { + "summary" : "GET /api/ee/public/document/{uuid}", + "description" : "Fetch a publicly-accessible Document. Does not require auth credentials. Public sharing must be enabled.\n\n Returns a Document with sensitive fields removed (excludes collection_id, permissions, creator details, etc.).\n Includes all embedded Cards with their metadata hydrated so the frontend doesn't need to make separate\n requests for each card — just like public Dashboards do.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/public" ] + } + }, + "/api/ee/public/document/{uuid}/card/{card-id}" : { + "get" : { + "summary" : "GET /api/ee/public/document/{uuid}/card/{card-id}", + "description" : "Run a query for a Card that's embedded in a public Document. Doesn't require auth credentials. Public sharing must\n be enabled.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + }, { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "parameters", + "required" : false, + "schema" : { + "type" : "string" + }, + "description" : "value must be a valid JSON string." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/public" ] + } + }, + "/api/ee/public/document/{uuid}/card/{card-id}/{export-format}" : { + "post" : { + "summary" : "POST /api/ee/public/document/{uuid}/card/{card-id}/{export-format}", + "description" : "Fetch a Card embedded in a public Document and return query results in the specified format.\n Does not require auth credentials. Public sharing must be enabled.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + }, { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "export-format", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.query-processor.schema.export-format" + } + } ], + "responses" : { + "2XX" : { + "description" : "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" : { + "anyOf" : [ { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, { + "description" : "value must be a valid JSON string.", + "type" : "string" + } ] + }, + "pivot_results" : { + "default" : false, + "type" : "boolean" + } + }, + "required" : [ "format_rows", "pivot_results" ] + } + } + } + }, + "tags" : [ "/api/ee/public" ] + } + }, + "/api/ee/remote-sync/branches" : { + "get" : { + "summary" : "GET /api/ee/remote-sync/branches", + "description" : "Get list of branches from the configured source.\n\n Returns a JSON object with branch names under the :items key.\n\n Requires superuser permissions.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:items -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "items" : { + "type" : "array", + "items" : { + "type" : "string" + } + } + }, + "required" : [ "items" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/remote-sync" ] + } + }, + "/api/ee/remote-sync/create-branch" : { + "post" : { + "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" : "map where {:status -> , :message -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "message" : { + "type" : "string" + }, + "status" : { + "type" : "string" + } + }, + "required" : [ "status", "message" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "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" : { + "summary" : "GET /api/ee/remote-sync/current-task", + "description" : "Get the current sync task", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "nullable map where {:id -> , :sync_task_type -> , :initiated_by (optional) -> , :progress -> , :started_at -> , :ended_at (optional) -> , :last_progress_report_at (optional) -> , :version (optional) -> , :cancelled (optional) -> , :error_message (optional) -> , :status -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "progress" : { + "type" : "number", + "minimum" : 0.0, + "maximum" : 1.0 + }, + "last_progress_report_at" : { }, + "id" : { + "type" : "integer", + "minimum" : 1 + }, + "started_at" : { }, + "ended_at" : { }, + "initiated_by" : { + "type" : "integer", + "minimum" : 1 + }, + "cancelled" : { + "type" : "boolean" + }, + "status" : { + "type" : "string", + "enum" : [ "running", "successful", "errored", "cancelled", "timed-out" ] + }, + "error_message" : { + "type" : "string" + }, + "sync_task_type" : { + "type" : "string", + "enum" : [ "import", "export" ] + }, + "version" : { + "type" : "string" + } + }, + "required" : [ "id", "sync_task_type", "started_at", "status" ], + "optional" : true + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/remote-sync" ] + } + }, + "/api/ee/remote-sync/current-task/cancel" : { + "post" : { + "summary" : "POST /api/ee/remote-sync/current-task/cancel", + "description" : "Cancels the current task if one is running", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:id -> , :sync_task_type -> , :initiated_by (optional) -> , :progress -> , :started_at -> , :ended_at (optional) -> , :last_progress_report_at (optional) -> , :version (optional) -> , :cancelled (optional) -> , :error_message (optional) -> , :status -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "progress" : { + "type" : "number", + "minimum" : 0.0, + "maximum" : 1.0 + }, + "last_progress_report_at" : { }, + "id" : { + "type" : "integer", + "minimum" : 1 + }, + "started_at" : { }, + "ended_at" : { }, + "initiated_by" : { + "type" : "integer", + "minimum" : 1 + }, + "cancelled" : { + "type" : "boolean" + }, + "status" : { + "type" : "string", + "enum" : [ "running", "successful", "errored", "cancelled", "timed-out" ] + }, + "error_message" : { + "type" : "string" + }, + "sync_task_type" : { + "type" : "string", + "enum" : [ "import", "export" ] + }, + "version" : { + "type" : "string" + } + }, + "required" : [ "id", "sync_task_type", "started_at", "status" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/remote-sync" ] + } + }, + "/api/ee/remote-sync/dirty" : { + "get" : { + "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" : "map where {:dirty -> , :name -> , :model -> , :sync_status -> , :created_at (optional) -> , :updated_at (optional) -> , :collection_id (optional) -> , :authority_level (optional) -> , :display (optional) -> , :query_type (optional) -> , :description (optional) -> }>}", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "dirty" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "model" : { + "type" : "string" + }, + "authority_level" : { + "type" : "string" + }, + "id" : { + "type" : "integer", + "minimum" : 1 + }, + "name" : { + "type" : "string" + }, + "updated_at" : { }, + "query_type" : { + "type" : "string" + }, + "collection_id" : { + "type" : "integer", + "minimum" : 1 + }, + "created_at" : { }, + "display" : { + "type" : "string" + }, + "sync_status" : { + "type" : "string" + }, + "description" : { + "type" : "string" + } + }, + "required" : [ "id", "model", "sync_status" ] + } + } + }, + "required" : [ "dirty" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/remote-sync" ] + } + }, + "/api/ee/remote-sync/export" : { + "post" : { + "summary" : "POST /api/ee/remote-sync/export", + "description" : "Export the current state of the Remote Sync collection to a Source.\n\n This endpoint will:\n - Fetch the latest changes from the source\n - Create a branch or subdirectory (depending on source support)\n If no branch is supplied, use the configured export branch\n - Export the Remote Sync collection via serialization to the branch or subdirectory\n - Commit the changes if possible\n - Sync to the source if possible\n\n Requires superuser permissions.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:message -> , :task_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "message" : { + "type" : "string" + }, + "task_id" : { + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "message", "task_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/remote-sync" ] + } + }, + "/api/ee/remote-sync/import" : { + "post" : { + "summary" : "POST /api/ee/remote-sync/import", + "description" : "Import Metabase content from configured Remote Sync source.\n\n This endpoint will:\n - Fetch the latest changes from the configured source\n - Load the updated content using the serialization/deserialization system\n\n If `force=false` (default) and there are unsaved changes in the Remote Sync collection,\n the import returns a 400 response.\n\n Requires superuser permissions.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:status -> , :task_id -> , :message (optional) -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "message" : { + "type" : "string" + }, + "status" : { + "const" : "success" + }, + "task_id" : { + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "status" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "branch" : { + "type" : "string", + "minLength" : 1 + }, + "force" : { + "type" : "boolean" + } + } + } + } + } + }, + "tags" : [ "/api/ee/remote-sync" ] + } + }, + "/api/ee/remote-sync/is-dirty" : { + "get" : { + "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" : "map where {:is_dirty -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "is_dirty" : { + "type" : "boolean" + } + }, + "required" : [ "is_dirty" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/remote-sync" ] + } + }, + "/api/ee/remote-sync/settings" : { + "put" : { + "summary" : "PUT /api/ee/remote-sync/settings", + "description" : "Update Remote Sync related settings. You must be a superuser to do this.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:success -> , :task_id (optional) -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "success" : { + "type" : "boolean" + }, + "task_id" : { + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "success" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "remote-sync-branch" : { + "type" : "string" + }, + "remote-sync-token" : { + "type" : "string" + }, + "remote-sync-type" : { + "type" : "string", + "enum" : [ "production", "development" ] + }, + "remote-sync-url" : { + "type" : "string" + } + } + } + } + } + }, + "tags" : [ "/api/ee/remote-sync" ] + } + }, + "/api/ee/remote-sync/stash" : { + "post" : { + "summary" : "POST /api/ee/remote-sync/stash", + "description" : "Stashes changes to a new branch, and changes the current branch to it.\n Requires superuser permissions.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:status -> , :message -> , :task_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "message" : { + "type" : "string" + }, + "status" : { + "type" : "string" + }, + "task_id" : { + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "status", "message", "task_id" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "message" : { + "type" : "string", + "minLength" : 1 + }, + "new_branch" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "new_branch", "message" ] + } + } + } + }, + "tags" : [ "/api/ee/remote-sync" ] + } + }, + "/api/ee/scim/api_key" : { + "get" : { + "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" : { + "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/scim/v2/Groups" : { + "get" : { + "summary" : "GET /api/ee/scim/v2/Groups", + "description" : "Fetch a list of groups.", + "parameters" : [ { + "in" : "query", + "name" : "startIndex", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "count", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "filter", + "required" : false, + "schema" : { + "type" : "string", + "minLength" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/scim/v2" ] + }, + "post" : { + "summary" : "POST /api/ee/scim/v2/Groups", + "description" : "Create a single group, and populates it if necessary.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "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" ] + } + }, + "/api/ee/scim/v2/Groups/{id}" : { + "get" : { + "summary" : "GET /api/ee/scim/v2/Groups/{id}", + "description" : "Fetch a single group.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "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/scim/v2" ] + }, + "put" : { + "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" + } + }, + "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" ] + }, + "delete" : { + "summary" : "DELETE /api/ee/scim/v2/Groups/{id}", + "description" : "Delete a group.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "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/scim/v2" ] + } + }, + "/api/ee/scim/v2/Users" : { + "get" : { + "summary" : "GET /api/ee/scim/v2/Users", + "description" : "Fetch a list of users.", + "parameters" : [ { + "in" : "query", + "name" : "startIndex", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "count", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "filter", + "required" : false, + "schema" : { + "type" : "string", + "minLength" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/scim/v2" ] + }, + "post" : { + "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" : { + "type" : "string", + "minLength" : 1 + }, + "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" ] + } + }, + "/api/ee/scim/v2/Users/{id}" : { + "get" : { + "summary" : "GET /api/ee/scim/v2/Users/{id}", + "description" : "Fetch a single user.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "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/scim/v2" ] + }, + "put" : { + "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" : { + "type" : "string", + "minLength" : 1 + }, + "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" : { + "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 + } + } ], + "responses" : { + "2XX" : { + "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 + }, + "value" : { + "anyOf" : [ { + "type" : "object", + "additionalProperties" : { + "anyOf" : [ { + "type" : "string", + "minLength" : 1 + }, { + "type" : "boolean" + } ] + } + }, { + "type" : "string", + "minLength" : 1 + }, { + "type" : "boolean" + } ] + } + }, + "required" : [ "op", "value" ] + } + }, + "schemas" : { + "type" : "array", + "items" : { + "type" : "string", + "minLength" : 1 + } + } + }, + "required" : [ "schemas", "Operations" ] + } + } + } + }, + "tags" : [ "/api/ee/scim/v2" ] + } + }, + "/api/ee/semantic-search/status" : { + "get" : { + "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 \n :total_est \n\n If no index is active, returns an empty map.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/semantic-search" ] + } + }, + "/api/ee/serialization/export" : { + "post" : { + "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" : { + "type" : "string" + }, + "description" : "name of directory and archive file (default: `-`)" + }, { + "in" : "query", + "name" : "collection", + "required" : false, + "schema" : { + "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}$" + } ] + } + }, + "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" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/serialization" ] + } + }, + "/api/ee/serialization/import" : { + "post" : { + "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" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "multipart/form-data" : { + "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 + } + }, + "required" : [ "file" ] + } + } + } + }, + "tags" : [ "/api/ee/serialization" ] + } + }, + "/api/ee/stale/{id}" : { + "get" : { + "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" + } ] + } + }, { + "in" : "query", + "name" : "before_date", + "required" : false, + "schema" : { + "type" : "string" + } + }, { + "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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/stale" ] + } + }, + "/api/ee/transform-job/" : { + "post" : { + "summary" : "POST /api/ee/transform-job/", + "description" : "Create a new transform job.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string", + "minLength" : 1 + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "schedule" : { + "type" : "string", + "minLength" : 1 + }, + "tag_ids" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "ui_display_type" : { + "default" : "cron/raw", + "type" : "string", + "enum" : [ "cron/raw", "cron/builder" ] + } + }, + "required" : [ "name", "schedule", "ui_display_type" ] + } + } + } + }, + "tags" : [ "/api/ee/transform-job" ] + }, + "get" : { + "summary" : "GET /api/ee/transform-job/", + "description" : "Get all transform jobs.", + "parameters" : [ { + "in" : "query", + "name" : "last_run_start_time", + "required" : false, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "query", + "name" : "next_run_start_time", + "required" : false, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "query", + "name" : "last_run_statuses", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "started", "succeeded", "failed", "timeout" ] + } + } + }, { + "in" : "query", + "name" : "tag_ids", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + } + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/transform-job" ] + } + }, + "/api/ee/transform-job/{job-id}" : { + "put" : { + "summary" : "PUT /api/ee/transform-job/{job-id}", + "description" : "Update a transform job.", + "parameters" : [ { + "in" : "path", + "name" : "job-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" : { + "description" : { + "type" : "string", + "minLength" : 1 + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "schedule" : { + "type" : "string", + "minLength" : 1 + }, + "tag_ids" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "ui_display_type" : { + "type" : "string", + "enum" : [ "cron/raw", "cron/builder" ] + } + } + } + } + } + }, + "tags" : [ "/api/ee/transform-job" ] + }, + "delete" : { + "summary" : "DELETE /api/ee/transform-job/{job-id}", + "description" : "Delete a transform job.", + "parameters" : [ { + "in" : "path", + "name" : "job-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/transform-job" ] + }, + "get" : { + "summary" : "GET /api/ee/transform-job/{job-id}", + "description" : "Get a transform job by ID.", + "parameters" : [ { + "in" : "path", + "name" : "job-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/transform-job" ] + } + }, + "/api/ee/transform-job/{job-id}/run" : { + "post" : { + "summary" : "POST /api/ee/transform-job/{job-id}/run", + "description" : "Run a transform job manually.", + "parameters" : [ { + "in" : "path", + "name" : "job-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/transform-job" ] + } + }, + "/api/ee/transform-job/{job-id}/transforms" : { + "get" : { + "summary" : "GET /api/ee/transform-job/{job-id}/transforms", + "description" : "Get the transforms of job specified by the job's ID.", + "parameters" : [ { + "in" : "path", + "name" : "job-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/transform-job" ] + } + }, + "/api/ee/transform-tag/" : { + "post" : { + "summary" : "POST /api/ee/transform-tag/", + "description" : "Create a new transform tag.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "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/transform-tag" ] + }, + "get" : { + "summary" : "GET /api/ee/transform-tag/", + "description" : "Get a list of all transform tags.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/transform-tag" ] + } + }, + "/api/ee/transform-tag/{tag-id}" : { + "put" : { + "summary" : "PUT /api/ee/transform-tag/{tag-id}", + "description" : "Update a transform tag.", + "parameters" : [ { + "in" : "path", + "name" : "tag-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" : { + "name" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "name" ] + } + } + } + }, + "tags" : [ "/api/ee/transform-tag" ] + }, + "delete" : { + "summary" : "DELETE /api/ee/transform-tag/{tag-id}", + "description" : "Delete a transform tag. Removes it from all transforms and jobs.", + "parameters" : [ { + "in" : "path", + "name" : "tag-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/transform-tag" ] + } + }, + "/api/ee/transform/" : { + "get" : { + "summary" : "GET /api/ee/transform/", + "description" : "Get a list of transforms.", + "parameters" : [ { + "in" : "query", + "name" : "last_run_start_time", + "required" : false, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "query", + "name" : "last_run_statuses", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "started", "succeeded", "failed", "timeout" ] + } + } + }, { + "in" : "query", + "name" : "tag_ids", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + } + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/transform" ] + }, + "post" : { + "summary" : "POST /api/ee/transform/", + "description" : "Create a new transform.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "run_trigger" : { + "$ref" : "#/components/schemas/metabase-enterprise.transforms.api.run-trigger" + }, + "source" : { + "$ref" : "#/components/schemas/metabase-enterprise.transforms.api.transform-source" + }, + "tag_ids" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "target" : { + "$ref" : "#/components/schemas/metabase-enterprise.transforms.api.transform-target" + } + }, + "required" : [ "name", "source", "target" ] + } + } + } + }, + "tags" : [ "/api/ee/transform" ] + } + }, + "/api/ee/transform/run" : { + "get" : { + "summary" : "GET /api/ee/transform/run", + "description" : "Get transform runs based on a set of filter params.", + "parameters" : [ { + "in" : "query", + "name" : "sort_column", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "started_at", "ended_at" ] + } + }, { + "in" : "query", + "name" : "sort_direction", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "asc", "desc" ] + } + }, { + "in" : "query", + "name" : "transform_ids", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + } + } + }, { + "in" : "query", + "name" : "statuses", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "started", "succeeded", "failed", "timeout" ] + } + } + }, { + "in" : "query", + "name" : "transform_tag_ids", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + } + } + }, { + "in" : "query", + "name" : "start_time", + "required" : false, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "query", + "name" : "end_time", + "required" : false, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "query", + "name" : "run_methods", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "manual", "cron" ] + } + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/transform" ] + } + }, + "/api/ee/transform/{id}" : { + "get" : { + "summary" : "GET /api/ee/transform/{id}", + "description" : "Get a specific transform.", + "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/ee/transform" ] + }, + "put" : { + "summary" : "PUT /api/ee/transform/{id}", + "description" : "Update a transform.", + "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" : { + "description" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "run_trigger" : { + "$ref" : "#/components/schemas/metabase-enterprise.transforms.api.run-trigger" + }, + "source" : { + "$ref" : "#/components/schemas/metabase-enterprise.transforms.api.transform-source" + }, + "tag_ids" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "target" : { + "$ref" : "#/components/schemas/metabase-enterprise.transforms.api.transform-target" + } + } + } + } + } + }, + "tags" : [ "/api/ee/transform" ] + }, + "delete" : { + "summary" : "DELETE /api/ee/transform/{id}", + "description" : "Delete a transform.", + "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/ee/transform" ] + } + }, + "/api/ee/transform/{id}/cancel" : { + "post" : { + "summary" : "POST /api/ee/transform/{id}/cancel", + "description" : "Cancel the current run for a given transform.", + "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/ee/transform" ] + } + }, + "/api/ee/transform/{id}/dependencies" : { + "get" : { + "summary" : "GET /api/ee/transform/{id}/dependencies", + "description" : "Get the dependencies of a specific transform.", + "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/ee/transform" ] + } + }, + "/api/ee/transform/{id}/run" : { + "post" : { + "summary" : "POST /api/ee/transform/{id}/run", + "description" : "Run a transform.", + "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/ee/transform" ] + } + }, + "/api/ee/transform/{id}/table" : { + "delete" : { + "summary" : "DELETE /api/ee/transform/{id}/table", + "description" : "Delete a transform's output table.", + "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/ee/transform" ] + } + }, + "/api/ee/transforms-python/library/{path}" : { + "get" : { + "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" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/transforms-python" ] + }, + "put" : { + "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" + } + } ], + "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/transforms-python/test-run" : { + "post" : { + "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" : "map where {:logs -> , :error (optional) -> }>, :output (optional) -> }>, :rows -> }>}", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "error" : { + "type" : "object", + "properties" : { + "message" : { + "anyOf" : [ { }, { } ] + } + }, + "required" : [ "message" ] + }, + "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" : [ "logs" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "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 + } ] + }, + "source_tables" : { + "type" : "object", + "additionalProperties" : { + "type" : "integer" + } + } + }, + "required" : [ "code", "source_tables" ] + } + } + } + }, + "tags" : [ "/api/ee/transforms-python" ] + } + }, + "/api/ee/upload-management/tables" : { + "get" : { + "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" : { + "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" : { + "type" : "boolean", + "default" : false + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/upload-management" ] + } + }, + "/api/eid-translation/translate" : { + "post" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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 }}", + "parameters" : [ { + "in" : "path", + "name" : "token", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/embed" ] + } + }, + "/api/embed/card/{token}/params/{param-key}/remapping" : { + "get" : { + "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" + } + }, { + "in" : "path", + "name" : "param-key", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "query", + "name" : "value", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/embed" ] + } + }, + "/api/embed/card/{token}/params/{param-key}/search/{prefix}" : { + "get" : { + "summary" : "GET /api/embed/card/{token}/params/{param-key}/search/{prefix}", + "description" : "Embedded version of chain filter search endpoint.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/embed" ] + } + }, + "/api/embed/card/{token}/params/{param-key}/values" : { + "get" : { + "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" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/embed" ] + } + }, + "/api/embed/card/{token}/query" : { + "get" : { + "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 }\n :params }", + "parameters" : [ { + "in" : "path", + "name" : "token", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/embed" ] + } + }, + "/api/embed/card/{token}/query/{export-format}" : { + "get" : { + "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" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/embed" ] + } + }, + "/api/embed/dashboard/{token}" : { + "get" : { + "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 }}", + "parameters" : [ { + "in" : "path", + "name" : "token", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/embed" ] + } + }, + "/api/embed/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}" : { + "get" : { + "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/embed" ] + } + }, + "/api/embed/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}/{export-format}" : { + "get" : { + "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" : "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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/embed" ] + } + }, + "/api/embed/dashboard/{token}/params/{param-key}/remapping" : { + "get" : { + "summary" : "GET /api/embed/dashboard/{token}/params/{param-key}/remapping", + "description" : "Embedded version of the remapped dashboard param value endpoint.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/embed" ] + } + }, + "/api/embed/dashboard/{token}/params/{param-key}/search/{prefix}" : { + "get" : { + "summary" : "GET /api/embed/dashboard/{token}/params/{param-key}/search/{prefix}", + "description" : "Embedded version of chain filter search endpoint.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/embed" ] + } + }, + "/api/embed/dashboard/{token}/params/{param-key}/values" : { + "get" : { + "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" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/embed" ] + } + }, + "/api/embed/pivot/card/{token}/query" : { + "get" : { + "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 }\n :params }", + "parameters" : [ { + "in" : "path", + "name" : "token", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/embed" ] + } + }, + "/api/embed/pivot/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}" : { + "get" : { + "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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/embed" ] + } + }, + "/api/embed/tiles/card/{token}/{zoom}/{x}/{y}" : { + "get" : { + "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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/embed" ] + } + }, + "/api/embed/tiles/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}/{zoom}/{x}/{y}" : { + "get" : { + "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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/embed" ] + } + }, + "/api/field/{id}" : { + "get" : { + "summary" : "GET /api/field/{id}", + "description" : "Get `Field` 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_editable_data_model", + "required" : true, + "schema" : { + "default" : false, + "type" : "boolean" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/field" ] + }, + "put" : { + "summary" : "PUT /api/field/{id}", + "description" : "Update `Field` 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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "points_of_interest" : { + "type" : "string", + "minLength" : 1 + }, + "settings" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "visibility_type" : { + "type" : "string", + "enum" : [ "retired", "sensitive", "normal", "hidden", "details-only" ] + }, + "coercion_strategy" : { + "description" : "value must be a valid coercion strategy (keyword or string)." + }, + "json_unfolding" : { + "type" : "boolean" + }, + "semantic_type" : { + "description" : "value must be a valid field semantic or relation type (keyword or string)." + }, + "has_field_values" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.has-field-values" + }, + "display_name" : { + "type" : "string", + "minLength" : 1 + }, + "nfc_path" : { + "type" : "array", + "items" : { + "type" : "string", + "minLength" : 1 + } + }, + "caveats" : { + "type" : "string", + "minLength" : 1 + }, + "description" : { + "type" : "string", + "minLength" : 1 + }, + "fk_target_field_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + } + } + } + } + }, + "tags" : [ "/api/field" ] + } + }, + "/api/field/{id}/dimension" : { + "post" : { + "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" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "human_readable_field_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "type" : { + "type" : "string", + "enum" : [ "internal", "external" ] + } + }, + "required" : [ "type", "name" ] + } + } + } + }, + "tags" : [ "/api/field" ] + }, + "delete" : { + "summary" : "DELETE /api/field/{id}/dimension", + "description" : "Remove the dimension associated to 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" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/field" ] + } + }, + "/api/field/{id}/discard_values" : { + "post" : { + "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", + "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" ] + } + }, + "/api/field/{id}/related" : { + "get" : { + "summary" : "GET /api/field/{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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/field" ] + } + }, + "/api/field/{id}/remapping/{remapped-id}" : { + "get" : { + "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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/field" ] + } + }, + "/api/field/{id}/rescan_values" : { + "post" : { + "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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/field" ] + } + }, + "/api/field/{id}/search/{search-id}" : { + "get" : { + "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/field" ] + } + }, + "/api/field/{id}/summary" : { + "get" : { + "summary" : "GET /api/field/{id}/summary", + "description" : "Get the count and distinct count of `Field` 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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/field" ] + } + }, + "/api/field/{id}/values" : { + "get" : { + "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" : { + "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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "values" : { + "type" : "array", + "items" : { + "anyOf" : [ { + "type" : "array", + "prefixItems" : [ { } ] + }, { + "type" : "array", + "prefixItems" : [ { }, { + "type" : "string", + "minLength" : 1 + } ] + } ] + } + } + }, + "required" : [ "values" ] + } + } + } + }, + "tags" : [ "/api/field" ] + } + }, + "/api/geojson/" : { + "get" : { + "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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/geojson" ] + } + }, + "/api/geojson/{key}" : { + "get" : { + "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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/geojson" ] + } + }, + "/api/glossary/" : { + "get" : { + "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" + } + }, + "tags" : [ "/api/glossary" ] + }, + "post" : { + "summary" : "POST /api/glossary/", + "description" : "Create a new glossary entry.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "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" ] + } + }, + "/api/glossary/{id}" : { + "put" : { + "summary" : "PUT /api/glossary/{id}", + "description" : "Update an existing glossary 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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "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" : { + "summary" : "DELETE /api/glossary/{id}", + "description" : "Delete a glossary 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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/glossary" ] + } + }, + "/api/google/settings" : { + "put" : { + "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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "google-auth-auto-create-accounts-domain" : { + "type" : "string" + }, + "google-auth-client-id" : { + "type" : "string" + }, + "google-auth-enabled" : { + "type" : "boolean" + } + } + } + } + } + }, + "tags" : [ "/api/google" ] + } + }, + "/api/ldap/settings" : { + "put" : { + "summary" : "PUT /api/ldap/settings", + "description" : "Update LDAP related settings. You must be a superuser 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" : { + "ldap-enabled" : { + "type" : "boolean" + }, + "ldap-host" : { + "type" : "string" + }, + "ldap-password" : { + "type" : "string" + }, + "ldap-port" : { + "type" : "integer", + "minimum" : 1 + } + } + } + } + } + }, + "tags" : [ "/api/ldap" ] + } + }, + "/api/logger/adjustment" : { + "post" : { + "summary" : "POST /api/logger/adjustment", + "description" : "Temporarily adjust the log levels.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "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/logger" ] + }, + "delete" : { + "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" : { + "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/logger/presets" : { + "get" : { + "summary" : "GET /api/logger/presets", + "description" : "Get all known presets.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "sequence of map where {:id -> , :display_name -> , :loggers -> , :level -> }>}", + "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" ] + } + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/logger" ] + } + }, + "/api/login-history/current" : { + "get" : { + "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/login-history" ] + } + }, + "/api/model-index/" : { + "post" : { + "summary" : "POST /api/model-index/", + "description" : "Create ModelIndex.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "model_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "pk_ref" : { }, + "value_ref" : { } + }, + "required" : [ "model_id", "pk_ref", "value_ref" ] + } + } + } + }, + "tags" : [ "/api/model-index" ] + }, + "get" : { + "summary" : "GET /api/model-index/", + "description" : "Retrieve list of ModelIndex.", + "parameters" : [ { + "in" : "query", + "name" : "model_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/model-index" ] + } + }, + "/api/model-index/{id}" : { + "get" : { + "summary" : "GET /api/model-index/{id}", + "description" : "Retrieve ModelIndex.", + "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/model-index" ] + }, + "delete" : { + "summary" : "DELETE /api/model-index/{id}", + "description" : "Delete ModelIndex.", + "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/model-index" ] + } + }, + "/api/moderation-review/" : { + "post" : { + "summary" : "POST /api/moderation-review/", + "description" : "Create a new `ModerationReview`.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "moderated_item_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "moderated_item_type" : { + "enum" : [ "card", "card", "dashboard", "dashboard" ] + }, + "status" : { + "type" : "string", + "enum" : [ "verified" ] + }, + "text" : { + "type" : "string" + } + }, + "required" : [ "moderated_item_id", "moderated_item_type" ] + } + } + } + }, + "tags" : [ "/api/moderation-review" ] + } + }, + "/api/mt/gtap/" : { + "get" : { + "summary" : "GET /api/mt/gtap/", + "description" : "Fetch a list of all GTAPs currently in use, or a single GTAP if both `group_id` and `table_id` are provided.", + "parameters" : [ { + "in" : "query", + "name" : "group_id", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "table_id", + "required" : false, + "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/mt/gtap" ] + }, + "post" : { + "summary" : "POST /api/mt/gtap/", + "description" : "Create a new GTAP.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "attribute_remappings" : { + "$ref" : "#/components/schemas/metabase-enterprise.sandbox.schema.attribute-remappings" + }, + "card_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "group_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "table_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "table_id", "group_id" ] + } + } + } + }, + "tags" : [ "/api/mt/gtap" ] + } + }, + "/api/mt/gtap/validate" : { + "post" : { + "summary" : "POST /api/mt/gtap/validate", + "description" : "Validate a sandbox which may not have yet been saved. This runs the same validation that is performed when the\n sandbox is saved, but doesn't actually save the sandbox.", + "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_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "table_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "table_id" ] + } + } + } + }, + "tags" : [ "/api/mt/gtap" ] + } + }, + "/api/mt/gtap/{id}" : { + "get" : { + "summary" : "GET /api/mt/gtap/{id}", + "description" : "Fetch GTAP by `id`", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/mt/gtap" ] + }, + "put" : { + "summary" : "PUT /api/mt/gtap/{id}", + "description" : "Update a GTAP entry. The only things you're allowed to update for a GTAP are the Card being used (`card_id`) or the\n parameter mappings; changing `table_id` or `group_id` would effectively be deleting this entry and creating a new\n one. If that's what you want to do, do so explicity with appropriate calls to the `DELETE` and `POST` endpoints.", + "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" : { + "attribute_remappings" : { + "$ref" : "#/components/schemas/metabase-enterprise.sandbox.schema.attribute-remappings" + }, + "card_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + } + } + } + } + }, + "tags" : [ "/api/mt/gtap" ] + }, + "delete" : { + "summary" : "DELETE /api/mt/gtap/{id}", + "description" : "Delete a GTAP 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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/mt/gtap" ] + } + }, + "/api/mt/user/attributes" : { + "get" : { + "summary" : "GET /api/mt/user/attributes", + "description" : "Fetch a list of possible keys for User `login_attributes`. This just looks at keys that have already been set for\n existing Users and returns those. ", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/mt/user" ] + } + }, + "/api/mt/user/{id}/attributes" : { + "put" : { + "summary" : "PUT /api/mt/user/{id}/attributes", + "description" : "Update the `login_attributes` for a User.", + "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" : { + "login_attributes" : { + "description" : "value must be a valid user attributes map (name -> value)", + "type" : "object", + "additionalProperties" : { } + } + } + } + } + } + }, + "tags" : [ "/api/mt/user" ] + } + }, + "/api/native-query-snippet/" : { + "get" : { + "summary" : "GET /api/native-query-snippet/", + "description" : "Fetch all snippets", + "parameters" : [ { + "in" : "query", + "name" : "archived", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/native-query-snippet" ] + }, + "post" : { + "summary" : "POST /api/native-query-snippet/", + "description" : "Create a new `NativeQuerySnippet`.", + "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" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "content" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "name" : { + "description" : "snippet names cannot include '}' or start with spaces" + } + }, + "required" : [ "content", "name" ] + } + } + } + }, + "tags" : [ "/api/native-query-snippet" ] + } + }, + "/api/native-query-snippet/{id}" : { + "get" : { + "summary" : "GET /api/native-query-snippet/{id}", + "description" : "Fetch native query snippet 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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/native-query-snippet" ] + }, + "put" : { + "summary" : "PUT /api/native-query-snippet/{id}", + "description" : "Update an existing `NativeQuerySnippet`.", + "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" : { + "archived" : { + "type" : "boolean" + }, + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "content" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "name" : { + "description" : "snippet names cannot include '}' or start with spaces" + } + } + } + } + } + }, + "tags" : [ "/api/native-query-snippet" ] + } + }, + "/api/notification/" : { + "get" : { + "summary" : "GET /api/notification/", + "description" : "List notifications.\n - `creator_id`: if provided returns only notifications created by this user\n - `recipient_id`: if provided returns only notification that has recipient_id as a recipient\n - `creator_or_recipient_id`: if provided returns only notification that has user_id as creator or recipient\n - `card_id`: if provided returns only notification that has card_id as payload", + "parameters" : [ { + "in" : "query", + "name" : "creator_id", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "recipient_id", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "creator_or_recipient_id", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "card_id", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "include_inactive", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "in" : "query", + "name" : "payload_type", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "notification/dashboard", "notification/system-event", "notification/testing", "notification/card" ] + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/notification" ] + }, + "post" : { + "summary" : "POST /api/notification/", + "description" : "Create a new notification, return the created notification.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.notification.models.FullyHydratedNotification" + } + } + } + }, + "tags" : [ "/api/notification" ] + } + }, + "/api/notification/send" : { + "post" : { + "summary" : "POST /api/notification/send", + "description" : "Send an unsaved notification.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.notification.models.FullyHydratedNotification" + } + } + } + }, + "tags" : [ "/api/notification" ] + } + }, + "/api/notification/unsubscribe/" : { + "post" : { + "summary" : "POST /api/notification/unsubscribe/", + "description" : "Allow non-users to unsubscribe from notifications, with the hash given through email.", + "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" : { + "type" : "string" + }, + "hash" : { + "type" : "string" + }, + "notification-handler-id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "notification-handler-id", "email", "hash" ] + } + } + } + }, + "tags" : [ "/api/notification/unsubscribe" ] + } + }, + "/api/notification/unsubscribe/undo" : { + "post" : { + "summary" : "POST /api/notification/unsubscribe/undo", + "description" : "Allow non-users to undo an unsubscribe from notifications, with the hash given through email.", + "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" : { + "type" : "string" + }, + "hash" : { + "type" : "string" + }, + "notification-handler-id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "notification-handler-id", "email", "hash" ] + } + } + } + }, + "tags" : [ "/api/notification/unsubscribe" ] + } + }, + "/api/notification/{id}" : { + "get" : { + "summary" : "GET /api/notification/{id}", + "description" : "Get a notification by id.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/notification" ] + }, + "put" : { + "summary" : "PUT /api/notification/{id}", + "description" : "Update a notification, can also update its subscriptions, handlers.\n Return the updated notification.", + "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" : { + "$ref" : "#/components/schemas/metabase.notification.models.FullyHydratedNotification" + } + } + } + }, + "tags" : [ "/api/notification" ] + } + }, + "/api/notification/{id}/send" : { + "post" : { + "summary" : "POST /api/notification/{id}/send", + "description" : "Send a notification by id.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "handler_ids" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + } + } + } + } + } + }, + "tags" : [ "/api/notification" ] + } + }, + "/api/notification/{id}/unsubscribe" : { + "post" : { + "summary" : "POST /api/notification/{id}/unsubscribe", + "description" : "Unsubscribe current user from a notification.", + "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/notification" ] + } + }, + "/api/notify/db/attached_datawarehouse" : { + "post" : { + "summary" : "POST /api/notify/db/attached_datawarehouse", + "description" : "Sync the attached datawarehouse. Can provide in the body:\n - table_name and schema_name: both strings. Will look for an existing table and sync it, otherwise will try to find a\n new table with that name and sync it. If it cannot find a table it will throw an error. If table_name is empty or\n blank, will sync the entire database.\n - synchronous?: is a boolean value to indicate if this should block on the result.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "schema_name" : { + "type" : "string" + }, + "synchronous?" : { + "type" : "boolean", + "default" : false + }, + "table_name" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ ] + } + } + } + }, + "tags" : [ "/api/notify" ] + } + }, + "/api/notify/db/{id}" : { + "post" : { + "summary" : "POST /api/notify/db/{id}", + "description" : "Notification about a potential schema change to one of our `Databases`.\n Caller can optionally specify a `:table_id` or `:table_name` in the body to limit updates to a single\n `Table`. Optional Parameter `:scan` can be `\"full\"` or `\"schema\"` for a full sync or a schema sync, available\n regardless if a `:table_id` or `:table_name` is passed.\n This endpoint is secured by an API key that needs to be passed as a `X-METABASE-APIKEY` header which needs to be defined in\n the `MB_API_KEY` [environment variable](https://www.metabase.com/docs/latest/configuring-metabase/environment-variables.html#mb_api_key)", + "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" : { + "scan" : { + "type" : "string", + "enum" : [ "full", "schema" ] + }, + "table_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "table_name" : { + "type" : "string", + "minLength" : 1 + } + } + } + } + } + }, + "tags" : [ "/api/notify" ] + } + }, + "/api/notify/db/{id}/new-table" : { + "post" : { + "summary" : "POST /api/notify/db/{id}/new-table", + "description" : "Sync a new table without running a full database sync. Requires `schema_name` and `table_name`. Will throw an error\n if the table already exists in Metabase or cannot be found.", + "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" : { + "schema_name" : { + "type" : "string", + "minLength" : 1 + }, + "table_name" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "schema_name", "table_name" ] + } + } + } + }, + "tags" : [ "/api/notify" ] + } + }, + "/api/permissions/graph" : { + "get" : { + "summary" : "GET /api/permissions/graph", + "description" : "Fetch a graph of all Permissions.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/permissions" ] + }, + "put" : { + "summary" : "PUT /api/permissions/graph", + "description" : "Do a batch update of Permissions by passing in a modified graph. This should return the same graph, in the same\n format, that you got from `GET /api/permissions/graph`, with any changes made in the wherever necessary. This\n modified graph must correspond to the `PermissionsGraph` schema. If successful, this endpoint returns the updated\n permissions graph; use this as a base for any further modifications.\n\n Revisions to the permissions graph are tracked. If you fetch the permissions graph and some other third-party\n modifies it before you can submit you revisions, the endpoint will instead make no changes and return a\n 409 (Conflict) response. In this case, you should fetch the updated graph and make desired changes to that.\n\n The optional `sandboxes` key contains a list of sandboxes that should be created or modified in conjunction with\n this permissions graph update. Since data sandboxing is an Enterprise Edition-only feature, a 402 (Payment Required)\n response will be returned if this key is present and the server is not running the Enterprise Edition, and/or the\n `:sandboxes` feature flag is not present.\n\n If the skip-graph query param is truthy, then the graph will not be returned.", + "parameters" : [ { + "in" : "query", + "name" : "skip-graph", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "force", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { } + } + } + } + }, + "tags" : [ "/api/permissions" ] + } + }, + "/api/permissions/graph/db/{db-id}" : { + "get" : { + "summary" : "GET /api/permissions/graph/db/{db-id}", + "description" : "Fetch a graph of all Permissions for db-id `db-id`.", + "parameters" : [ { + "in" : "path", + "name" : "db-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/permissions" ] + } + }, + "/api/permissions/graph/group/{group-id}" : { + "get" : { + "summary" : "GET /api/permissions/graph/group/{group-id}", + "description" : "Fetch a graph of all Permissions for group-id `group-id`.", + "parameters" : [ { + "in" : "path", + "name" : "group-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/permissions" ] + } + }, + "/api/permissions/group" : { + "get" : { + "summary" : "GET /api/permissions/group", + "description" : "Fetch all `PermissionsGroups`, including a count of the number of `:members` in that group.\n This API requires superuser or group manager of more than one group.\n Group manager is only available if `advanced-permissions` is enabled and returns only groups that user\n is manager of.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/permissions" ] + }, + "post" : { + "summary" : "POST /api/permissions/group", + "description" : "Create a new `PermissionsGroup`.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "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/permissions" ] + } + }, + "/api/permissions/group/{group-id}" : { + "put" : { + "summary" : "PUT /api/permissions/group/{group-id}", + "description" : "Update the name of a `PermissionsGroup`.", + "parameters" : [ { + "in" : "path", + "name" : "group-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" : { + "name" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "name" ] + } + } + } + }, + "tags" : [ "/api/permissions" ] + }, + "delete" : { + "summary" : "DELETE /api/permissions/group/{group-id}", + "description" : "Delete a specific `PermissionsGroup`.", + "parameters" : [ { + "in" : "path", + "name" : "group-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/permissions" ] + } + }, + "/api/permissions/group/{id}" : { + "get" : { + "summary" : "GET /api/permissions/group/{id}", + "description" : "Fetch the details for a certain permissions group.", + "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/permissions" ] + } + }, + "/api/permissions/membership" : { + "get" : { + "summary" : "GET /api/permissions/membership", + "description" : "Fetch a map describing the group memberships of various users.\n This map's format is:\n\n { [{:membership_id \n :group_id \n :is_group_manager boolean}]}", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/permissions" ] + }, + "post" : { + "summary" : "POST /api/permissions/membership", + "description" : "Add a `User` to a `PermissionsGroup`. Returns updated list of members belonging to the group.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "group_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "is_group_manager" : { + "type" : "boolean", + "default" : false + }, + "user_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "group_id", "user_id" ] + } + } + } + }, + "tags" : [ "/api/permissions" ] + } + }, + "/api/permissions/membership/{group-id}/clear" : { + "put" : { + "summary" : "PUT /api/permissions/membership/{group-id}/clear", + "description" : "Remove all members from a `PermissionsGroup`. Returns a 400 (Bad Request) if the group ID is for the admin group.", + "parameters" : [ { + "in" : "path", + "name" : "group-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/permissions" ] + } + }, + "/api/permissions/membership/{id}" : { + "put" : { + "summary" : "PUT /api/permissions/membership/{id}", + "description" : "Update a Permission Group membership. Returns the updated record.", + "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" : { + "is_group_manager" : { + "type" : "boolean" + } + }, + "required" : [ "is_group_manager" ] + } + } + } + }, + "tags" : [ "/api/permissions" ] + }, + "delete" : { + "summary" : "DELETE /api/permissions/membership/{id}", + "description" : "Remove a User from a PermissionsGroup (delete their membership).", + "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/permissions" ] + } + }, + "/api/persist/" : { + "get" : { + "summary" : "GET /api/persist/", + "description" : "List the entries of [[PersistedInfo]] in order to show a status page.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/persist" ] + } + }, + "/api/persist/card/{card-id}" : { + "get" : { + "summary" : "GET /api/persist/card/{card-id}", + "description" : "Fetch a particular [[PersistedInfo]] by card-id.", + "parameters" : [ { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/persist" ] + } + }, + "/api/persist/card/{card-id}/persist" : { + "post" : { + "summary" : "POST /api/persist/card/{card-id}/persist", + "description" : "Mark the model (card) as persisted. Runs the query and saves it to the database backing the card and hot swaps this\n query in place of the model's query.", + "parameters" : [ { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/persist" ] + } + }, + "/api/persist/card/{card-id}/refresh" : { + "post" : { + "summary" : "POST /api/persist/card/{card-id}/refresh", + "description" : "Refresh the persisted model caching `card-id`.", + "parameters" : [ { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/persist" ] + } + }, + "/api/persist/card/{card-id}/unpersist" : { + "post" : { + "summary" : "POST /api/persist/card/{card-id}/unpersist", + "description" : "Unpersist this model. Deletes the persisted table backing the model and all queries after this will use the card's\n query rather than the saved version of the query.", + "parameters" : [ { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/persist" ] + } + }, + "/api/persist/database/{id}/persist" : { + "post" : { + "summary" : "POST /api/persist/database/{id}/persist", + "description" : "Attempt to enable model persistence for a database. If already enabled returns a generic 204.", + "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/persist" ] + } + }, + "/api/persist/database/{id}/unpersist" : { + "post" : { + "summary" : "POST /api/persist/database/{id}/unpersist", + "description" : "Attempt to disable model persistence for a database. If already not enabled, just returns a generic 204.", + "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/persist" ] + } + }, + "/api/persist/disable" : { + "post" : { + "summary" : "POST /api/persist/disable", + "description" : "Disable global setting to allow databases to persist models. This will remove all tasks to refresh tables, remove\n that option from databases which might have it enabled, and delete all cached tables.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/persist" ] + } + }, + "/api/persist/enable" : { + "post" : { + "summary" : "POST /api/persist/enable", + "description" : "Enable global setting to allow databases to persist models.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/persist" ] + } + }, + "/api/persist/set-refresh-schedule" : { + "post" : { + "summary" : "POST /api/persist/set-refresh-schedule", + "description" : "Set the cron schedule to refresh persisted models.\n Shape should be JSON like {cron: \"0 30 1/8 * * ? *\"}.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "cron" : { + "description" : "Value must be a string representing a cron schedule of format ", + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "cron" ] + } + } + } + }, + "tags" : [ "/api/persist" ] + } + }, + "/api/persist/{persisted-info-id}" : { + "get" : { + "summary" : "GET /api/persist/{persisted-info-id}", + "description" : "Fetch a particular [[PersistedInfo]] by id.", + "parameters" : [ { + "in" : "path", + "name" : "persisted-info-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/persist" ] + } + }, + "/api/premium-features/token/status" : { + "get" : { + "summary" : "GET /api/premium-features/token/status", + "description" : "Fetch info about the current Premium-Features premium features token including whether it is `valid`, a `trial` token, its\n `features`, when it is `valid-thru`, and the `status` of the account.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/premium-features" ] + } + }, + "/api/preview_embed/card/{token}" : { + "get" : { + "summary" : "GET /api/preview_embed/card/{token}", + "description" : "Fetch a Card you're considering embedding by passing a JWT `token`.", + "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/preview_embed" ] + } + }, + "/api/preview_embed/card/{token}/params/{param-key}/remapping" : { + "get" : { + "summary" : "GET /api/preview_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" + } + }, { + "in" : "path", + "name" : "param-key", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "query", + "name" : "value", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/preview_embed" ] + } + }, + "/api/preview_embed/card/{token}/query" : { + "get" : { + "summary" : "GET /api/preview_embed/card/{token}/query", + "description" : "Fetch the query results for a Card you're considering embedding by passing a JWT `token`.", + "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/preview_embed" ] + } + }, + "/api/preview_embed/dashboard/{token}" : { + "get" : { + "summary" : "GET /api/preview_embed/dashboard/{token}", + "description" : "Fetch a Dashboard you're considering embedding by passing a JWT `token`. ", + "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/preview_embed" ] + } + }, + "/api/preview_embed/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}" : { + "get" : { + "summary" : "GET /api/preview_embed/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}", + "description" : "Fetch the results of running a Card belonging to a Dashboard you're considering embedding with JWT `token`.", + "parameters" : [ { + "in" : "path", + "name" : "token", + "required" : true, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "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/preview_embed" ] + } + }, + "/api/preview_embed/dashboard/{token}/params/{param-key}/remapping" : { + "get" : { + "summary" : "GET /api/preview_embed/dashboard/{token}/params/{param-key}/remapping", + "description" : "Embedded version of the remapped dashboard param value endpoint.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/preview_embed" ] + } + }, + "/api/preview_embed/dashboard/{token}/params/{param-key}/values" : { + "get" : { + "summary" : "GET /api/preview_embed/dashboard/{token}/params/{param-key}/values", + "description" : "Embedded version of chain filter values endpoint.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/preview_embed" ] + } + }, + "/api/preview_embed/pivot/card/{token}/query" : { + "get" : { + "summary" : "GET /api/preview_embed/pivot/card/{token}/query", + "description" : "Fetch the query results for a Card you're considering embedding by passing a JWT `token`.", + "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/preview_embed" ] + } + }, + "/api/preview_embed/pivot/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}" : { + "get" : { + "summary" : "GET /api/preview_embed/pivot/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}", + "description" : "Fetch the results of running a Card belonging to a Dashboard you're considering embedding with JWT `token`.", + "parameters" : [ { + "in" : "path", + "name" : "token", + "required" : true, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "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/preview_embed" ] + } + }, + "/api/preview_embed/tiles/card/{token}/{zoom}/{x}/{y}" : { + "get" : { + "summary" : "GET /api/preview_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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/preview_embed" ] + } + }, + "/api/preview_embed/tiles/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}/{zoom}/{x}/{y}" : { + "get" : { + "summary" : "GET /api/preview_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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/preview_embed" ] + } + }, + "/api/product-feedback/" : { + "post" : { + "summary" : "POST /api/product-feedback/", + "description" : "Endpoint to provide feedback from the product", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "comments" : { + "type" : "string", + "minLength" : 1 + }, + "email" : { + "type" : "string", + "minLength" : 1 + }, + "source" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "source" ] + } + } + } + }, + "tags" : [ "/api/product-feedback" ] + } + }, + "/api/public/action/{uuid}" : { + "get" : { + "summary" : "GET /api/public/action/{uuid}", + "description" : "Fetch a publicly-accessible Action. Does not require auth credentials. Public sharing must be enabled.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/public" ] + } + }, + "/api/public/action/{uuid}/execute" : { + "post" : { + "summary" : "POST /api/public/action/{uuid}/execute", + "description" : "Execute the Action.\n\n `parameters` should be the mapped dashboard parameters with values.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "parameters" : { + "type" : "object", + "additionalProperties" : { } + } + } + } + } + } + }, + "tags" : [ "/api/public" ] + } + }, + "/api/public/card/{uuid}" : { + "get" : { + "summary" : "GET /api/public/card/{uuid}", + "description" : "Fetch a publicly-accessible Card an return query results as well as `:card` information. Does not require auth\n credentials. Public sharing must be enabled.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/public" ] + } + }, + "/api/public/card/{uuid}/params/{param-key}/remapping" : { + "get" : { + "summary" : "GET /api/public/card/{uuid}/params/{param-key}/remapping", + "description" : "Fetch the remapped value for the given `value` of parameter with ID `:param-key` of card with UUID `uuid`.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + }, { + "in" : "path", + "name" : "param-key", + "required" : true, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "query", + "name" : "value", + "required" : true, + "schema" : { } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/public" ] + } + }, + "/api/public/card/{uuid}/params/{param-key}/search/{query}" : { + "get" : { + "summary" : "GET /api/public/card/{uuid}/params/{param-key}/search/{query}", + "description" : "Fetch values for a parameter on a public card containing `query`.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + }, { + "in" : "path", + "name" : "param-key", + "required" : true, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "path", + "name" : "query", + "required" : true, + "schema" : { + "type" : "string", + "minLength" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/public" ] + } + }, + "/api/public/card/{uuid}/params/{param-key}/values" : { + "get" : { + "summary" : "GET /api/public/card/{uuid}/params/{param-key}/values", + "description" : "Fetch values for a parameter on a public card.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + }, { + "in" : "path", + "name" : "param-key", + "required" : true, + "schema" : { + "type" : "string", + "minLength" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/public" ] + } + }, + "/api/public/card/{uuid}/query" : { + "get" : { + "summary" : "GET /api/public/card/{uuid}/query", + "description" : "Fetch a publicly-accessible Card an return query results as well as `:card` information. Does not require auth\n credentials. Public sharing must be enabled.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + }, { + "in" : "query", + "name" : "parameters", + "required" : false, + "schema" : { + "type" : "string" + }, + "description" : "value must be a valid JSON string." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/public" ] + } + }, + "/api/public/card/{uuid}/query/{export-format}" : { + "get" : { + "summary" : "GET /api/public/card/{uuid}/query/{export-format}", + "description" : "Fetch a publicly-accessible Card and return query results in the specified format. Does not require auth\n credentials. Public sharing must be enabled.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + }, { + "in" : "path", + "name" : "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" + } + }, { + "in" : "query", + "name" : "parameters", + "required" : false, + "schema" : { + "type" : "string" + }, + "description" : "value must be a valid JSON string." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/public" ] + } + }, + "/api/public/dashboard/{uuid}" : { + "get" : { + "summary" : "GET /api/public/dashboard/{uuid}", + "description" : "Fetch a publicly-accessible Dashboard. Does not require auth credentials. Public sharing must be enabled.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/public" ] + } + }, + "/api/public/dashboard/{uuid}/dashcard/{dashcard-id}/card/{card-id}" : { + "get" : { + "summary" : "GET /api/public/dashboard/{uuid}/dashcard/{dashcard-id}/card/{card-id}", + "description" : "Fetch the results for a Card in a publicly-accessible Dashboard. Does not require auth credentials. Public\n sharing must be enabled.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + }, { + "in" : "path", + "name" : "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" : "query", + "name" : "parameters", + "required" : false, + "schema" : { + "type" : "string" + }, + "description" : "value must be a valid JSON string." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/public" ] + } + }, + "/api/public/dashboard/{uuid}/dashcard/{dashcard-id}/card/{card-id}/{export-format}" : { + "post" : { + "summary" : "POST /api/public/dashboard/{uuid}/dashcard/{dashcard-id}/card/{card-id}/{export-format}", + "description" : "Fetch the results of running a publicly-accessible Card belonging to a Dashboard and return the data in one of the\n export formats. Does not require auth credentials. Public sharing must be enabled.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + }, { + "in" : "path", + "name" : "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" : { + "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" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { } + } + }, + "pivot_results" : { + "default" : false, + "type" : "boolean" + } + }, + "required" : [ "format_rows", "pivot_results" ] + } + } + } + }, + "tags" : [ "/api/public" ] + } + }, + "/api/public/dashboard/{uuid}/dashcard/{dashcard-id}/execute" : { + "get" : { + "summary" : "GET /api/public/dashboard/{uuid}/dashcard/{dashcard-id}/execute", + "description" : "Fetches the values for filling in execution parameters. Pass PK parameters and values to select.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + }, { + "in" : "path", + "name" : "dashcard-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "parameters", + "required" : true, + "schema" : { + "type" : "string" + }, + "description" : "value must be a valid JSON string." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/public" ] + }, + "post" : { + "summary" : "POST /api/public/dashboard/{uuid}/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.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + }, { + "in" : "path", + "name" : "dashcard-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" : { + "parameters" : { + "type" : "object", + "additionalProperties" : { } + } + } + } + } + } + }, + "tags" : [ "/api/public" ] + } + }, + "/api/public/dashboard/{uuid}/params/{param-key}/remapping" : { + "get" : { + "summary" : "GET /api/public/dashboard/{uuid}/params/{param-key}/remapping", + "description" : "Fetch the remapped value for the given `value` of parameter with ID `:param-key` of dashboard with UUID `uuid`.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + }, { + "in" : "path", + "name" : "param-key", + "required" : true, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "query", + "name" : "value", + "required" : true, + "schema" : { } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/public" ] + } + }, + "/api/public/dashboard/{uuid}/params/{param-key}/search/{query}" : { + "get" : { + "summary" : "GET /api/public/dashboard/{uuid}/params/{param-key}/search/{query}", + "description" : "Fetch filter values for dashboard parameter `param-key`, containing specified `query`.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + }, { + "in" : "path", + "name" : "param-key", + "required" : true, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "path", + "name" : "query", + "required" : true, + "schema" : { + "type" : "string", + "minLength" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/public" ] + } + }, + "/api/public/dashboard/{uuid}/params/{param-key}/values" : { + "get" : { + "summary" : "GET /api/public/dashboard/{uuid}/params/{param-key}/values", + "description" : "Fetch filter values for dashboard parameter `param-key`.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + }, { + "in" : "path", + "name" : "param-key", + "required" : true, + "schema" : { + "type" : "string", + "minLength" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/public" ] + } + }, + "/api/public/oembed" : { + "get" : { + "summary" : "GET /api/public/oembed", + "description" : "oEmbed endpoint used to retrieve embed code and metadata for a (public) Metabase URL.", + "parameters" : [ { + "in" : "query", + "name" : "url", + "required" : true, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "query", + "name" : "format", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "json" ] + }, + "description" : "The format param is not used by the API, but is required as part of the oEmbed spec: http://oembed.com/#section2 just return an error if `format` is specified and it's anything other than `json`." + }, { + "in" : "query", + "name" : "maxheight", + "required" : true, + "schema" : { + "default" : 800, + "type" : "integer", + "minimum" : 1 + } + }, { + "in" : "query", + "name" : "maxwidth", + "required" : true, + "schema" : { + "default" : 1024, + "type" : "integer", + "minimum" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/public" ] + } + }, + "/api/public/pivot/card/{uuid}/query" : { + "get" : { + "summary" : "GET /api/public/pivot/card/{uuid}/query", + "description" : "Fetch a publicly-accessible Card an return query results as well as `:card` information. Does not require auth\n credentials. Public sharing must be enabled.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + }, { + "in" : "query", + "name" : "parameters", + "required" : false, + "schema" : { + "type" : "string" + }, + "description" : "value must be a valid JSON string." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/public" ] + } + }, + "/api/public/pivot/dashboard/{uuid}/dashcard/{dashcard-id}/card/{card-id}" : { + "get" : { + "summary" : "GET /api/public/pivot/dashboard/{uuid}/dashcard/{dashcard-id}/card/{card-id}", + "description" : "Fetch the results for a Card in a publicly-accessible Dashboard. Does not require auth credentials. Public\n sharing must be enabled.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + }, { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "dashcard-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "parameters", + "required" : false, + "schema" : { + "type" : "string" + }, + "description" : "value must be a valid JSON string." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/public" ] + } + }, + "/api/public/tiles/card/{uuid}/{zoom}/{x}/{y}" : { + "get" : { + "summary" : "GET /api/public/tiles/card/{uuid}/{zoom}/{x}/{y}", + "description" : "Generates a single tile image for a publicly-accessible Card using the map visualization. Does not require auth\n credentials. Public sharing must be enabled.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + }, { + "in" : "path", + "name" : "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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/public" ] + } + }, + "/api/public/tiles/dashboard/{uuid}/dashcard/{dashcard-id}/card/{card-id}/{zoom}/{x}/{y}" : { + "get" : { + "summary" : "GET /api/public/tiles/dashboard/{uuid}/dashcard/{dashcard-id}/card/{card-id}/{zoom}/{x}/{y}", + "description" : "Generates a single tile image for a Card using the map visualization in a publicly-accessible Dashboard. Does not\n require auth credentials. Public sharing must be enabled.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + }, { + "in" : "path", + "name" : "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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/public" ] + } + }, + "/api/pulse/" : { + "get" : { + "summary" : "GET /api/pulse/", + "description" : "Fetch all dashboard subscriptions. By default, returns only subscriptions for which the current user has write\n permissions. For admins, this is all subscriptions; for non-admins, it is only subscriptions that they created.\n\n If `dashboard_id` is specified, restricts results to subscriptions for that dashboard.\n\n If `created_or_receive` is `true`, it specifically returns all subscriptions for which the current user\n created *or* is a known recipient of. Note that this is a superset of the default items returned for non-admins,\n and a subset of the default items returned for admins. This is used to power the /account/notifications page.\n This may include subscriptions which the current user does not have collection permissions for, in which case\n some sensitive metadata (the list of cards and recipients) is stripped out.", + "parameters" : [ { + "in" : "query", + "name" : "archived", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "dashboard_id", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "creator_or_recipient", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/pulse" ] + }, + "post" : { + "summary" : "POST /api/pulse/", + "description" : "Create a new `Pulse`.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "cards" : { }, + "channels" : { }, + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "collection_position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "dashboard_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "parameters" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { } + } + }, + "skip_if_empty" : { + "type" : "boolean", + "default" : false + } + }, + "required" : [ "name", "cards", "channels" ] + } + } + } + }, + "tags" : [ "/api/pulse" ] + } + }, + "/api/pulse/form_input" : { + "get" : { + "summary" : "GET /api/pulse/form_input", + "description" : "Provides relevant configuration information and user choices for creating/updating Pulses.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/pulse" ] + } + }, + "/api/pulse/preview_card/{id}" : { + "get" : { + "summary" : "GET /api/pulse/preview_card/{id}", + "description" : "Get HTML rendering of a Card 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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/pulse" ] + } + }, + "/api/pulse/preview_card_info/{id}" : { + "get" : { + "summary" : "GET /api/pulse/preview_card_info/{id}", + "description" : "Get JSON object containing HTML rendering of a Card with `id` and other information.", + "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/pulse" ] + } + }, + "/api/pulse/preview_card_png/{id}" : { + "get" : { + "summary" : "GET /api/pulse/preview_card_png/{id}", + "description" : "Get PNG rendering of a Card with `id`. Optionally specify `width` as a query parameter.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "width", + "required" : false, + "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/pulse" ] + } + }, + "/api/pulse/preview_dashboard/{id}" : { + "get" : { + "summary" : "GET /api/pulse/preview_dashboard/{id}", + "description" : "Get HTML rendering of a Dashboard with `id`.\n\n This endpoint relies on a custom middleware defined in `metabase.channel.render.core/style-tag-nonce-middleware` to\n allow the style tag to render properly, given our Content Security Policy setup. This middleware is attached to these\n routes at the bottom of this namespace using `metabase.api.common/define-routes`.", + "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/pulse" ] + } + }, + "/api/pulse/test" : { + "post" : { + "summary" : "POST /api/pulse/test", + "description" : "Test send an unsaved pulse.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "cards" : { }, + "channels" : { }, + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "collection_position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "dashboard_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "skip_if_empty" : { + "type" : "boolean", + "default" : false + } + }, + "required" : [ "name", "cards", "channels" ] + } + } + } + }, + "tags" : [ "/api/pulse" ] + } + }, + "/api/pulse/unsubscribe/" : { + "post" : { + "summary" : "POST /api/pulse/unsubscribe/", + "description" : "Allow non-users to unsubscribe from pulses/subscriptions, with the hash given through email.", + "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" : { + "type" : "string" + }, + "hash" : { + "type" : "string" + }, + "pulse-id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "pulse-id", "email", "hash" ] + } + } + } + }, + "tags" : [ "/api/pulse/unsubscribe" ] + } + }, + "/api/pulse/unsubscribe/undo" : { + "post" : { + "summary" : "POST /api/pulse/unsubscribe/undo", + "description" : "Allow non-users to undo an unsubscribe from pulses/subscriptions, with the hash given through email.", + "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" : { + "type" : "string" + }, + "hash" : { + "type" : "string" + }, + "pulse-id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "pulse-id", "email", "hash" ] + } + } + } + }, + "tags" : [ "/api/pulse/unsubscribe" ] + } + }, + "/api/pulse/{id}" : { + "get" : { + "summary" : "GET /api/pulse/{id}", + "description" : "Fetch `Pulse` with ID. If the user is a recipient of the Pulse but does not have read permissions for its collection,\n we still return it but with some sensitive metadata removed.", + "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/pulse" ] + }, + "put" : { + "summary" : "PUT /api/pulse/{id}", + "description" : "Update a Pulse 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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "archived" : { + "type" : "boolean", + "default" : false + }, + "cards" : { }, + "channels" : { }, + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "parameters" : { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, + "skip_if_empty" : { + "type" : "boolean", + "default" : false + } + }, + "required" : [ ] + } + } + } + }, + "tags" : [ "/api/pulse" ] + } + }, + "/api/pulse/{id}/subscription" : { + "delete" : { + "summary" : "DELETE /api/pulse/{id}/subscription", + "description" : "For users to unsubscribe themselves from a pulse subscription.", + "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/pulse" ] + } + }, + "/api/revision/" : { + "get" : { + "summary" : "GET /api/revision/", + "description" : "Get revisions of an object.", + "parameters" : [ { + "in" : "query", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "entity", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "card", "dashboard", "document", "segment" ] + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/revision" ] + } + }, + "/api/revision/revert" : { + "post" : { + "summary" : "POST /api/revision/revert", + "description" : "Revert an object to a prior revision.", + "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" : { + "type" : "string", + "enum" : [ "card", "dashboard", "document", "segment" ] + }, + "id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "revision_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "id", "entity", "revision_id" ] + } + } + } + }, + "tags" : [ "/api/revision" ] + } + }, + "/api/revision/{entity}/{id}" : { + "get" : { + "summary" : "GET /api/revision/{entity}/{id}", + "description" : "Fetch `Revisions` for an object with ID.", + "parameters" : [ { + "in" : "path", + "name" : "entity", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "card", "dashboard", "document", "segment" ] + } + }, { + "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/revision" ] + } + }, + "/api/search/" : { + "get" : { + "summary" : "GET /api/search/", + "description" : "Search for items in Metabase.\n For the list of supported models, check [[metabase.search.config/all-models]].\n\n Filters:\n - `archived`: set to true to search archived items only, default is false\n - `table_db_id`: search for tables, cards, and models of a certain DB\n - `models`: only search for items of specific models. If not provided, search for all models\n - `filters_items_in_personal_collection`: only search for items in personal collections\n - `created_at`: search for items created at a specific timestamp\n - `created_by`: search for items created by a specific user\n - `last_edited_at`: search for items last edited at a specific timestamp\n - `last_edited_by`: search for items last edited by a specific user\n - `search_native_query`: set to true to search the content of native queries\n - `verified`: set to true to search for verified items only (requires Content Management or Official Collections premium feature)\n - `ids`: search for items with those ids, works iff single value passed to `models`\n - `display_type`: search for cards/models with specific display types\n - `non_temporal_dim_ids`: search for cards/metrics/datasets with this exact set of non temporal dimension field IDs (requires appdb engine)\n - `has_temporal_dim`: set to true for cards/metrics/datasets with 1 or more temporal dimensions (requires appdb engine)\n\n Note that not all item types support all filters, and the results will include only models that support the provided\n filters. For example:\n\n - The `created-by` filter supports dashboards, models, actions, and cards.\n - The `verified` filter supports models and cards.\n\n A search query that has both filters applied will only return models and cards.", + "parameters" : [ { + "in" : "query", + "name" : "q", + "required" : false, + "schema" : { + "type" : "string" + } + }, { + "in" : "query", + "name" : "context", + "required" : false, + "schema" : { + "type" : "string" + } + }, { + "in" : "query", + "name" : "archived", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "table_db_id", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "models", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "dashboard", "table", "dataset", "segment", "collection", "transform", "document", "database", "action", "indexed-entity", "metric", "card" ] + } + } + }, { + "in" : "query", + "name" : "filter_items_in_personal_collection", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "all", "only", "only-mine", "exclude", "exclude-others" ] + } + }, { + "in" : "query", + "name" : "created_at", + "required" : false, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "query", + "name" : "created_by", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + } + }, { + "in" : "query", + "name" : "display_type", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "minLength" : 1 + } + } + }, { + "in" : "query", + "name" : "last_edited_at", + "required" : false, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "query", + "name" : "last_edited_by", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + } + }, { + "in" : "query", + "name" : "model_ancestors", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "search_engine", + "required" : false, + "schema" : { + "type" : "string" + } + }, { + "in" : "query", + "name" : "search_native_query", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "in" : "query", + "name" : "verified", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "in" : "query", + "name" : "ids", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + } + }, { + "in" : "query", + "name" : "calculate_available_models", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "in" : "query", + "name" : "include_dashboard_questions", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "include_metadata", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "non_temporal_dim_ids", + "required" : false, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "query", + "name" : "has_temporal_dim", + "required" : false, + "schema" : { + "type" : "boolean" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/search" ] + } + }, + "/api/search/force-reindex" : { + "post" : { + "summary" : "POST /api/search/force-reindex", + "description" : "This will trigger an immediate reindexing, if we are using search index.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/search" ] + } + }, + "/api/search/re-init" : { + "post" : { + "summary" : "POST /api/search/re-init", + "description" : "This will blow away any search indexes, re-create, and re-populate them.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/search" ] + } + }, + "/api/search/weights" : { + "get" : { + "summary" : "GET /api/search/weights", + "description" : "Return the current weights being used to rank the search results", + "parameters" : [ { + "in" : "query", + "name" : "context", + "required" : true, + "schema" : { + "default" : "default", + "type" : "string" + } + }, { + "in" : "query", + "name" : "search_engine", + "required" : false, + "schema" : { } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/search" ] + }, + "put" : { + "summary" : "PUT /api/search/weights", + "description" : "Update the current weights being used to rank the search results", + "parameters" : [ { + "in" : "query", + "name" : "context", + "required" : true, + "schema" : { + "default" : "default", + "type" : "string" + } + }, { + "in" : "query", + "name" : "search_engine", + "required" : false, + "schema" : { } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/search" ] + } + }, + "/api/segment/" : { + "post" : { + "summary" : "POST /api/segment/", + "description" : "Create a new `Segment`.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "definition" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "description" : { + "type" : "string" + }, + "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/segment" ] + }, + "get" : { + "summary" : "GET /api/segment/", + "description" : "Fetch *all* `Segments`.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/segment" ] + } + }, + "/api/segment/{id}" : { + "get" : { + "summary" : "GET /api/segment/{id}", + "description" : "Fetch `Segment` 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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/segment" ] + }, + "put" : { + "summary" : "PUT /api/segment/{id}", + "description" : "Update a `Segment` 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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "archived" : { + "type" : "boolean" + }, + "caveats" : { + "type" : "string" + }, + "definition" : { + "type" : "object", + "properties" : { } + }, + "description" : { + "type" : "string" + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "points_of_interest" : { + "type" : "string" + }, + "revision_message" : { + "type" : "string", + "minLength" : 1 + }, + "show_in_getting_started" : { + "type" : "boolean" + } + }, + "required" : [ "revision_message" ] + } + } + } + }, + "tags" : [ "/api/segment" ] + }, + "delete" : { + "summary" : "DELETE /api/segment/{id}", + "description" : "Archive a Segment. (DEPRECATED -- Just pass updated value of `:archived` to the `PUT` endpoint instead.)", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "revision_message", + "required" : true, + "schema" : { + "type" : "string", + "minLength" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/segment" ] + } + }, + "/api/segment/{id}/related" : { + "get" : { + "summary" : "GET /api/segment/{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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/segment" ] + } + }, + "/api/session/" : { + "post" : { + "summary" : "POST /api/session/", + "description" : "Login.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "password" : { + "type" : "string", + "minLength" : 1 + }, + "username" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "username", "password" ] + } + } + } + }, + "tags" : [ "/api/session" ] + }, + "delete" : { + "summary" : "DELETE /api/session/", + "description" : "Logout.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/session" ] + } + }, + "/api/session/forgot_password" : { + "post" : { + "summary" : "POST /api/session/forgot_password", + "description" : "Send a reset email when user has forgotten their password.", + "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" : { + "description" : "value must be a valid email address.", + "type" : "string" + } + }, + "required" : [ "email" ] + } + } + } + }, + "tags" : [ "/api/session" ] + } + }, + "/api/session/google_auth" : { + "post" : { + "summary" : "POST /api/session/google_auth", + "description" : "Login with Google Auth.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "token" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "token" ] + } + } + } + }, + "tags" : [ "/api/session" ] + } + }, + "/api/session/password-check" : { + "post" : { + "summary" : "POST /api/session/password-check", + "description" : "Endpoint that checks if the supplied password meets the currently configured password complexity rules.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "password" : { + "description" : "password is too common.", + "type" : "string" + } + }, + "required" : [ "password" ] + } + } + } + }, + "tags" : [ "/api/session" ] + } + }, + "/api/session/password_reset_token_valid" : { + "get" : { + "summary" : "GET /api/session/password_reset_token_valid", + "description" : "Check if a password reset token is valid and isn't expired.", + "parameters" : [ { + "in" : "query", + "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/session" ] + } + }, + "/api/session/properties" : { + "get" : { + "summary" : "GET /api/session/properties", + "description" : "Get all properties and their values. These are the specific `Settings` that are readable by the current user, or are\n public if no user is logged in.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/session" ] + } + }, + "/api/session/reset_password" : { + "post" : { + "summary" : "POST /api/session/reset_password", + "description" : "Reset password with a reset token.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "password" : { + "description" : "password is too common.", + "type" : "string" + }, + "token" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "token", "password" ] + } + } + } + }, + "tags" : [ "/api/session" ] + } + }, + "/api/setting/" : { + "get" : { + "summary" : "GET /api/setting/", + "description" : "Get all `Settings` and their values. You must be a superuser or have `setting` permission to do this.\n For non-superusers, a list of visible settings and values can be retrieved using the /api/session/properties endpoint.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/setting" ] + }, + "put" : { + "summary" : "PUT /api/setting/", + "description" : "Update multiple `Settings` values. If called by a non-superuser, only user-local settings can be updated.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "additionalProperties" : { } + } + } + } + }, + "tags" : [ "/api/setting" ] + } + }, + "/api/setting/{key}" : { + "get" : { + "summary" : "GET /api/setting/{key}", + "description" : "Fetch a single `Setting`.", + "parameters" : [ { + "in" : "path", + "name" : "key", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/setting" ] + }, + "put" : { + "summary" : "PUT /api/setting/{key}", + "description" : "Create/update a `Setting`. If called by a non-admin, only user-local settings can be updated.\n This endpoint can also be used to delete Settings by passing `nil` for `:value`.", + "parameters" : [ { + "in" : "path", + "name" : "key", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "value" : { } + }, + "required" : [ "value" ] + } + } + } + }, + "tags" : [ "/api/setting" ] + } + }, + "/api/setup/" : { + "post" : { + "summary" : "POST /api/setup/", + "description" : "Special endpoint for creating the first user during setup. This endpoint both creates the user AND logs them in and\n returns a session ID. This endpoint can also be used to set specific settings from the setup flow.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "prefs" : { + "type" : "object", + "properties" : { + "site_locale" : { + "description" : "String must be a valid two-letter ISO language or language-country code e.g. 'en' or 'en_US'.", + "type" : "string", + "minLength" : 1 + }, + "site_name" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "site_name" ] + }, + "token" : { + "description" : "Token does not match the setup token.", + "type" : "string", + "minLength" : 1 + }, + "user" : { + "type" : "object", + "properties" : { + "email" : { + "description" : "value must be a valid email address.", + "type" : "string" + }, + "first_name" : { + "type" : "string", + "minLength" : 1 + }, + "last_name" : { + "type" : "string", + "minLength" : 1 + }, + "password" : { + "description" : "password is too common.", + "type" : "string" + } + }, + "required" : [ "email", "password" ] + } + }, + "required" : [ "token", "user", "prefs" ] + } + } + } + }, + "tags" : [ "/api/setup" ] + } + }, + "/api/setup/user_defaults" : { + "get" : { + "summary" : "GET /api/setup/user_defaults", + "description" : "Returns object containing default user details for initial setup, if configured,\n and if the provided token value matches the token in the configuration value.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/setup" ] + } + }, + "/api/slack/bug-report" : { + "post" : { + "summary" : "POST /api/slack/bug-report", + "description" : "Send diagnostic information to the configured Slack channels.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "diagnosticInfo" : { + "type" : "object" + } + }, + "required" : [ "diagnosticInfo" ] + } + } + } + }, + "tags" : [ "/api/slack" ] + } + }, + "/api/slack/manifest" : { + "get" : { + "summary" : "GET /api/slack/manifest", + "description" : "Returns the YAML manifest file that should be used to bootstrap new Slack apps", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/slack" ] + } + }, + "/api/slack/settings" : { + "put" : { + "summary" : "PUT /api/slack/settings", + "description" : "Update Slack related settings. You must be a superuser to do this. Also updates the slack-cache.\n There are 3 cases where we alter the slack channel/user cache:\n 1. falsy token -> clear\n 2. invalid token -> clear\n 3. truthy, valid token -> refresh ", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "slack-app-token" : { + "type" : "string", + "minLength" : 1 + }, + "slack-bug-report-channel" : { + "type" : "string" + } + } + } + } + } + }, + "tags" : [ "/api/slack" ] + } + }, + "/api/table/" : { + "get" : { + "summary" : "GET /api/table/", + "description" : "Get all `Tables`.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/table" ] + }, + "put" : { + "summary" : "PUT /api/table/", + "description" : "Update all `Table` in `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" : { + "points_of_interest" : { + "type" : "string" + }, + "visibility_type" : { + "type" : "string", + "enum" : [ "technical", "hidden", "cruft" ] + }, + "data_authority" : { + "$ref" : "#/components/schemas/metabase.warehouse-schema.api.table.data-authority-write" + }, + "show_in_getting_started" : { + "type" : "boolean" + }, + "ids" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "display_name" : { + "type" : "string", + "minLength" : 1 + }, + "caveats" : { + "type" : "string" + }, + "entity_type" : { + "description" : "value must be a valid entity type (keyword or string)." + }, + "description" : { + "type" : "string" + } + }, + "required" : [ "ids" ] + } + } + } + }, + "tags" : [ "/api/table" ] + } + }, + "/api/table/card__:id/fks" : { + "get" : { + "summary" : "GET /api/table/card__:id/fks", + "description" : "Return FK info for the 'virtual' table for a Card. This is always empty, so this endpoint\n serves mainly as a placeholder to avoid having to change anything on the frontend.", + "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/table" ] + } + }, + "/api/table/card__:id/query_metadata" : { + "get" : { + "summary" : "GET /api/table/card__:id/query_metadata", + "description" : "Return metadata for the 'virtual' table for a Card.", + "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/table" ] + } + }, + "/api/table/{id}" : { + "get" : { + "summary" : "GET /api/table/{id}", + "description" : "Get `Table` 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_editable_data_model", + "required" : false, + "schema" : { + "type" : "boolean" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/table" ] + }, + "put" : { + "summary" : "PUT /api/table/{id}", + "description" : "Update `Table` 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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "points_of_interest" : { + "type" : "string" + }, + "visibility_type" : { + "type" : "string", + "enum" : [ "technical", "hidden", "cruft" ] + }, + "data_authority" : { + "$ref" : "#/components/schemas/metabase.warehouse-schema.api.table.data-authority-write" + }, + "show_in_getting_started" : { + "type" : "boolean" + }, + "display_name" : { + "type" : "string", + "minLength" : 1 + }, + "caveats" : { + "type" : "string" + }, + "entity_type" : { + "description" : "value must be a valid entity type (keyword or string)." + }, + "field_order" : { + "type" : "string", + "enum" : [ "alphabetical", "custom", "database", "smart" ] + }, + "description" : { + "type" : "string" + } + } + } + } + } + }, + "tags" : [ "/api/table" ] + } + }, + "/api/table/{id}/append-csv" : { + "post" : { + "summary" : "POST /api/table/{id}/append-csv", + "description" : "Inserts the rows of an uploaded CSV file into the table identified by `:id`. The table must have been created by\n uploading a CSV file.", + "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" : { + "multipart/form-data" : { + "schema" : { + "type" : "object", + "properties" : { + "file" : { + "type" : "object", + "properties" : { + "filename" : { + "type" : "string" + }, + "tempfile" : { } + }, + "required" : [ "filename", "tempfile" ] + } + }, + "required" : [ "file" ] + } + } + } + }, + "tags" : [ "/api/table" ] + } + }, + "/api/table/{id}/discard_values" : { + "post" : { + "summary" : "POST /api/table/{id}/discard_values", + "description" : "Discard the FieldValues belonging to the Fields in this Table. Only applies to fields that have FieldValues. If\n this Table's Database is set up to automatically sync FieldValues, they will be recreated during the next cycle.", + "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/table" ] + } + }, + "/api/table/{id}/fields/order" : { + "put" : { + "summary" : "PUT /api/table/{id}/fields/order", + "description" : "Reorder fields", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "map where {:success -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "success" : { + "const" : true + } + }, + "required" : [ "success" ] + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + } + } + } + }, + "tags" : [ "/api/table" ] + } + }, + "/api/table/{id}/fks" : { + "get" : { + "summary" : "GET /api/table/{id}/fks", + "description" : "Get all foreign keys whose destination is a `Field` that belongs to this `Table`.", + "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/table" ] + } + }, + "/api/table/{id}/query_metadata" : { + "get" : { + "summary" : "GET /api/table/{id}/query_metadata", + "description" : "Get metadata about a `Table` useful for running queries.\n Returns DB, fields, field FKs, and field values.\n\n Passing `include_hidden_fields=true` will include any hidden `Fields` in the response. Defaults to `false`\n Passing `include_sensitive_fields=true` will include any sensitive `Fields` in the response. Defaults to `false`.\n\n Passing `include_editable_data_model=true` will check that the current user has write permissions for the table's\n data model, while `false` checks that they have data access perms for the table. Defaults to `false`.\n\n These options are provided for use in the Admin Edit Metadata page.", + "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_sensitive_fields", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "include_hidden_fields", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "include_editable_data_model", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/table" ] + } + }, + "/api/table/{id}/related" : { + "get" : { + "summary" : "GET /api/table/{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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/table" ] + } + }, + "/api/table/{id}/replace-csv" : { + "post" : { + "summary" : "POST /api/table/{id}/replace-csv", + "description" : "Replaces the contents of the table identified by `:id` with the rows of an uploaded CSV file. The table must have\n been created by uploading a CSV file.", + "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" : { + "multipart/form-data" : { + "schema" : { + "type" : "object", + "properties" : { + "file" : { + "type" : "object", + "properties" : { + "filename" : { + "type" : "string" + }, + "tempfile" : { } + }, + "required" : [ "filename", "tempfile" ] + } + }, + "required" : [ "file" ] + } + } + } + }, + "tags" : [ "/api/table" ] + } + }, + "/api/table/{id}/rescan_values" : { + "post" : { + "summary" : "POST /api/table/{id}/rescan_values", + "description" : "Manually trigger an update for the FieldValues for the Fields belonging to this Table. Only applies to Fields that\n are eligible for 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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/table" ] + } + }, + "/api/table/{id}/sync_schema" : { + "post" : { + "summary" : "POST /api/table/{id}/sync_schema", + "description" : "Trigger a manual update of the schema metadata for this `Table`.", + "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/table" ] + } + }, + "/api/table/{table-id}/data" : { + "get" : { + "summary" : "GET /api/table/{table-id}/data", + "description" : "Get the data for the given table", + "parameters" : [ { + "in" : "path", + "name" : "table-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/table" ] + } + }, + "/api/task/" : { + "get" : { + "summary" : "GET /api/task/", + "description" : "Fetch a list of recent tasks stored as Task History", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/task" ] + } + }, + "/api/task/info" : { + "get" : { + "summary" : "GET /api/task/info", + "description" : "Return raw data about all scheduled tasks (i.e., Quartz Jobs and Triggers).", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/task" ] + } + }, + "/api/task/unique-tasks" : { + "get" : { + "summary" : "GET /api/task/unique-tasks", + "description" : "Returns possibly empty vector of unique task names in alphabetical order. It is expected that number of unique\n tasks is small, hence no need for pagination. If that changes this endpoint and function that powers it should\n reflect that.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/task" ] + } + }, + "/api/task/{id}" : { + "get" : { + "summary" : "GET /api/task/{id}", + "description" : "Get `TaskHistory` entry 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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/task" ] + } + }, + "/api/tiles/{card-id}/{zoom}/{x}/{y}" : { + "get" : { + "summary" : "GET /api/tiles/{card-id}/{zoom}/{x}/{y}", + "description" : "Generates a single tile image for a saved Card.", + "parameters" : [ { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.card" + } + }, { + "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" : { + "$ref" : "#/components/schemas/metabase.tiles.api.parameters" + } + }, { + "in" : "query", + "name" : "latField", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.tiles.api.legacy-ref" + } + }, { + "in" : "query", + "name" : "lonField", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.tiles.api.legacy-ref" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/tiles" ] + } + }, + "/api/tiles/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/{zoom}/{x}/{y}" : { + "get" : { + "summary" : "GET /api/tiles/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/{zoom}/{x}/{y}", + "description" : "Generates a single tile image for a dashcard.", + "parameters" : [ { + "in" : "path", + "name" : "dashboard-id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.dashboard" + } + }, { + "in" : "path", + "name" : "dashcard-id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.dashcard" + } + }, { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.card" + } + }, { + "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" : { + "$ref" : "#/components/schemas/metabase.tiles.api.parameters" + } + }, { + "in" : "query", + "name" : "latField", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.tiles.api.legacy-ref" + } + }, { + "in" : "query", + "name" : "lonField", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.tiles.api.legacy-ref" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/tiles" ] + } + }, + "/api/tiles/{zoom}/{x}/{y}" : { + "get" : { + "summary" : "GET /api/tiles/{zoom}/{x}/{y}", + "description" : "Generates a single tile image for an ad-hoc query.", + "parameters" : [ { + "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" : "query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.tiles.api.query" + } + }, { + "in" : "query", + "name" : "latField", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.tiles.api.legacy-ref" + } + }, { + "in" : "query", + "name" : "lonField", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.tiles.api.legacy-ref" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/tiles" ] + } + }, + "/api/timeline-event/" : { + "post" : { + "summary" : "POST /api/timeline-event/", + "description" : "Create a new [[TimelineEvent]].", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "question_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "timezone" : { + "type" : "string" + }, + "timestamp" : { + "description" : "value must be a valid date string", + "type" : "string" + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "archived" : { + "type" : "boolean" + }, + "timeline_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "source" : { + "type" : "string", + "enum" : [ "collections", "question" ] + }, + "time_matters" : { + "type" : "boolean" + }, + "description" : { + "type" : "string" + }, + "icon" : { + "type" : "string", + "enum" : [ "star", "cake", "mail", "warning", "bell", "cloud" ] + } + }, + "required" : [ "name", "timestamp", "timezone", "timeline_id" ] + } + } + } + }, + "tags" : [ "/api/timeline-event" ] + } + }, + "/api/timeline-event/{id}" : { + "get" : { + "summary" : "GET /api/timeline-event/{id}", + "description" : "Fetch the [[TimelineEvent]] 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" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/timeline-event" ] + }, + "put" : { + "summary" : "PUT /api/timeline-event/{id}", + "description" : "Update a [[TimelineEvent]].", + "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" : { + "archived" : { + "type" : "boolean" + }, + "description" : { + "type" : "string" + }, + "icon" : { + "type" : "string", + "enum" : [ "star", "cake", "mail", "warning", "bell", "cloud" ] + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "time_matters" : { + "type" : "boolean" + }, + "timeline_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "timestamp" : { + "description" : "value must be a valid date string", + "type" : "string" + }, + "timezone" : { + "type" : "string" + } + } + } + } + } + }, + "tags" : [ "/api/timeline-event" ] + }, + "delete" : { + "summary" : "DELETE /api/timeline-event/{id}", + "description" : "Delete a [[TimelineEvent]].", + "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/timeline-event" ] + } + }, + "/api/timeline/" : { + "post" : { + "summary" : "POST /api/timeline/", + "description" : "Create a new [[Timeline]].", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:id -> }", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.timeline.api.timeline.Timeline" + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "archived" : { + "type" : "boolean" + }, + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "default" : { + "type" : "boolean" + }, + "description" : { + "type" : "string" + }, + "icon" : { + "type" : "string", + "enum" : [ "star", "cake", "mail", "warning", "bell", "cloud" ] + }, + "name" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "name" ] + } + } + } + }, + "tags" : [ "/api/timeline" ] + }, + "get" : { + "summary" : "GET /api/timeline/", + "description" : "Fetch a list of `Timeline`s. Can include `archived=true` to return archived timelines.", + "parameters" : [ { + "in" : "query", + "name" : "include", + "required" : false, + "schema" : { + "$ref" : "#/components/schemas/metabase.timeline.api.timeline.include" + } + }, { + "in" : "query", + "name" : "archived", + "required" : true, + "schema" : { + "default" : false, + "type" : "boolean" + } + } ], + "responses" : { + "2XX" : { + "description" : "sequence of map where {:id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.timeline.api.timeline.Timeline" + } + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/timeline" ] + } + }, + "/api/timeline/collection/root" : { + "get" : { + "summary" : "GET /api/timeline/collection/root", + "description" : "Fetch the root Collection's timelines.", + "parameters" : [ { + "in" : "query", + "name" : "include", + "required" : false, + "schema" : { + "const" : "events" + } + }, { + "in" : "query", + "name" : "archived", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/timeline" ] + } + }, + "/api/timeline/collection/{id}" : { + "get" : { + "summary" : "GET /api/timeline/collection/{id}", + "description" : "Fetch a specific Collection's timelines.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "include", + "required" : false, + "schema" : { + "const" : "events" + } + }, { + "in" : "query", + "name" : "archived", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/timeline" ] + } + }, + "/api/timeline/{id}" : { + "get" : { + "summary" : "GET /api/timeline/{id}", + "description" : "Fetch the `Timeline` with `id`. Include `include=events` to unarchived events included on the timeline. Add\n `archived=true` to return all events on the timeline, both archived and unarchived.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "include", + "required" : false, + "schema" : { + "$ref" : "#/components/schemas/metabase.timeline.api.timeline.include" + } + }, { + "in" : "query", + "name" : "archived", + "required" : true, + "schema" : { + "default" : "false", + "type" : "boolean" + } + }, { + "in" : "query", + "name" : "start", + "required" : false, + "schema" : { + "type" : "string" + }, + "description" : "value must be a valid date string" + }, { + "in" : "query", + "name" : "end", + "required" : false, + "schema" : { + "type" : "string" + }, + "description" : "value must be a valid date string" + } ], + "responses" : { + "2XX" : { + "description" : "map where {:id -> }", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.timeline.api.timeline.Timeline" + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/timeline" ] + }, + "put" : { + "summary" : "PUT /api/timeline/{id}", + "description" : "Update the [[Timeline]] with `id`. Returns the timeline without events. Archiving a timeline will archive all of the\n events in that timeline.", + "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" : { + "archived" : { + "type" : "boolean" + }, + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "default" : { + "type" : "boolean" + }, + "description" : { + "type" : "string" + }, + "icon" : { + "type" : "string", + "enum" : [ "star", "cake", "mail", "warning", "bell", "cloud" ] + }, + "name" : { + "type" : "string", + "minLength" : 1 + } + } + } + } + } + }, + "tags" : [ "/api/timeline" ] + }, + "delete" : { + "summary" : "DELETE /api/timeline/{id}", + "description" : "Delete a [[Timeline]]. Will cascade delete its events as well.", + "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/timeline" ] + } + }, + "/api/upload/csv" : { + "post" : { + "summary" : "POST /api/upload/csv", + "description" : "Create a table and model populated with the values from the attached CSV. Returns the model ID if successful.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "multipart/form-data" : { + "schema" : { + "type" : "object", + "properties" : { + "collection_id" : { + "type" : "integer", + "minimum" : 1 + }, + "file" : { + "type" : "object", + "properties" : { + "filename" : { + "type" : "string" + }, + "tempfile" : { } + }, + "required" : [ "filename", "tempfile" ] + } + }, + "required" : [ "file" ] + } + } + } + }, + "tags" : [ "/api/upload" ] + } + }, + "/api/user-key-value/namespace/{namespace}" : { + "get" : { + "summary" : "GET /api/user-key-value/namespace/{namespace}", + "description" : "Returns all KV pairs in a given namespace for the current user", + "parameters" : [ { + "in" : "path", + "name" : "namespace", + "required" : true, + "schema" : { + "type" : "string", + "minLength" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/user-key-value" ] + } + }, + "/api/user-key-value/namespace/{namespace}/key/{key}" : { + "put" : { + "summary" : "PUT /api/user-key-value/namespace/{namespace}/key/{key}", + "description" : "Upsert a KV-pair for the user", + "parameters" : [ { + "in" : "path", + "name" : "key", + "required" : true, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "path", + "name" : "namespace", + "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" : { + "expires_at" : { + "$ref" : "#/components/schemas/metabase.lib.schema.literal..string.datetime" + }, + "value" : { } + } + } + } + } + }, + "tags" : [ "/api/user-key-value" ] + }, + "get" : { + "summary" : "GET /api/user-key-value/namespace/{namespace}/key/{key}", + "description" : "Get a value for the user", + "parameters" : [ { + "in" : "path", + "name" : "key", + "required" : true, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "path", + "name" : "namespace", + "required" : true, + "schema" : { + "type" : "string", + "minLength" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/user-key-value" ] + }, + "delete" : { + "summary" : "DELETE /api/user-key-value/namespace/{namespace}/key/{key}", + "description" : "Deletes a KV-pair for the user", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/user-key-value" ] + } + }, + "/api/user/" : { + "get" : { + "summary" : "GET /api/user/", + "description" : "Fetch a list of `Users` for admins or group managers.\n By default returns only active users for admins and only active users within groups that the group manager is\n managing for group managers.\n\n - If `status` is `deactivated`, include deactivated users only.\n\n - If `status` is `all`, include all users (active and inactive).\n\n - Also supports `include_deactivated`, which if true, is equivalent to `status=all`; If is false, is equivalent to\n `status=active`. `status` and `include_deactivated` requires superuser permissions.\n\n - `include_deactivated` is a legacy alias for `status` and will be removed in a future release, users are advised\n to use `status` for better support and flexibility.\n\n If both params are passed, `status` takes precedence.\n\n For users with segmented permissions, return only themselves.\n\n Takes `limit`, `offset` for pagination.\n\n Takes `query` for filtering on first name, last name, email.\n\n Also takes `group_id`, which filters on group id.", + "parameters" : [ { + "in" : "query", + "name" : "status", + "required" : false, + "schema" : { + "type" : "string" + } + }, { + "in" : "query", + "name" : "query", + "required" : false, + "schema" : { + "type" : "string" + } + }, { + "in" : "query", + "name" : "group_id", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "include_deactivated", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/user" ] + }, + "post" : { + "summary" : "POST /api/user/", + "description" : "Create a new `User`, return a 400 if the email address is already taken", + "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" : { + "description" : "value must be a valid email address.", + "type" : "string" + }, + "first_name" : { + "type" : "string", + "minLength" : 1 + }, + "last_name" : { + "type" : "string", + "minLength" : 1 + }, + "login_attributes" : { + "description" : "login attribute keys must be a keyword or string", + "type" : "object", + "additionalProperties" : { } + }, + "source" : { + "type" : "string", + "minLength" : 1, + "default" : "admin" + }, + "user_group_memberships" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.users.api.user-group-membership" + } + } + }, + "required" : [ "email" ] + } + } + } + }, + "tags" : [ "/api/user" ] + } + }, + "/api/user/current" : { + "get" : { + "summary" : "GET /api/user/current", + "description" : "Fetch the current `User`.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/user" ] + } + }, + "/api/user/recipients" : { + "get" : { + "summary" : "GET /api/user/recipients", + "description" : "Fetch a list of `Users`. Returns only active users. Meant for non-admins unlike GET /api/user.\n\n - If user-visibility is :all or the user is an admin, include all users.\n - If user-visibility is :group, include only users in the same group (excluding the all users group).\n - If user-visibility is :none or the user is sandboxed, include only themselves.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/user" ] + } + }, + "/api/user/{id}" : { + "get" : { + "summary" : "GET /api/user/{id}", + "description" : "Fetch a `User`. You must be fetching yourself *or* be a superuser *or* a Group Manager.", + "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/user" ] + }, + "put" : { + "summary" : "PUT /api/user/{id}", + "description" : "Update an existing, active `User`.\n Self or superusers can update user info and groups.\n Group Managers can only add/remove users from groups they are manager of.", + "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" : { + "email" : { + "description" : "value must be a valid email address.", + "type" : "string" + }, + "first_name" : { + "type" : "string", + "minLength" : 1 + }, + "is_group_manager" : { + "type" : "boolean" + }, + "is_superuser" : { + "type" : "boolean" + }, + "last_name" : { + "type" : "string", + "minLength" : 1 + }, + "locale" : { + "description" : "String must be a valid two-letter ISO language or language-country code e.g. 'en' or 'en_US'.", + "type" : "string", + "minLength" : 1 + }, + "login_attributes" : { + "description" : "login attribute keys must be a keyword or string", + "type" : "object", + "additionalProperties" : { } + }, + "user_group_memberships" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.users.api.user-group-membership" + } + } + } + } + } + } + }, + "tags" : [ "/api/user" ] + }, + "delete" : { + "summary" : "DELETE /api/user/{id}", + "description" : "Disable a `User`. This does not remove the `User` from the DB, but instead disables their account.", + "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/user" ] + } + }, + "/api/user/{id}/modal/{modal}" : { + "put" : { + "summary" : "PUT /api/user/{id}/modal/{modal}", + "description" : "Indicate that a user has been informed about the vast intricacies of 'the' Query Builder.", + "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/user" ] + } + }, + "/api/user/{id}/password" : { + "put" : { + "summary" : "PUT /api/user/{id}/password", + "description" : "Update a user's password.", + "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" : { + "password" : { + "description" : "password is too common.", + "type" : "string" + } + }, + "required" : [ "password" ] + } + } + } + }, + "tags" : [ "/api/user" ] + } + }, + "/api/user/{id}/reactivate" : { + "put" : { + "summary" : "PUT /api/user/{id}/reactivate", + "description" : "Reactivate user 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" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/user" ] + } + }, + "/api/util/random_token" : { + "get" : { + "summary" : "GET /api/util/random_token", + "description" : "Return a cryptographically secure random 32-byte token, encoded as a hexadecimal string.\n Intended for use when creating a value for `embedding-secret-key`.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/util" ] + } + } + }, + "servers" : [ { + "url" : "http://localhost:3000", + "description" : "Localhost" + } ] +} \ No newline at end of file diff --git a/_docs/v0.57/configuring-metabase/appearance.md b/_docs/v0.57/configuring-metabase/appearance.md index df5b7ae3a0..4a9c6000c4 100644 --- a/_docs/v0.57/configuring-metabase/appearance.md +++ b/_docs/v0.57/configuring-metabase/appearance.md @@ -39,9 +39,11 @@ Appearance settings are split across different tabs: People can display their Metabase in dark mode in their [account settings](../people-and-groups/account-settings#theme). Options are: - - System default (which is also the default setting). Metabase will switch between light and dark mode when the system switches without having to reload the page. - - Always use dark mode. - - Always use light mode. +- System default (which is also the default setting). Metabase will switch between light and dark mode when the system switches without having to reload the page. +- Always use dark mode. +- Always use light mode. + +You can quickly toggle dark mode from anywhere in Metabase by opening the [command palette](../exploration-and-organization/exploration#command-palette) and searching for "light" or "dark" or "theme". Dark mode is a user-level setting, not an instance-level setting. Currently, there's no way to change the theme to dark mode for the entire instance, but you can edit some [user interface colors](#user-interface-colors). diff --git a/_docs/v0.57/configuring-metabase/config-template.md b/_docs/v0.57/configuring-metabase/config-template.md index 7f0b2246ca..4f8e9243a3 100644 --- a/_docs/v0.57/configuring-metabase/config-template.md +++ b/_docs/v0.57/configuring-metabase/config-template.md @@ -162,6 +162,7 @@ config: health-check-logging-enabled: true help-link: metabase help-link-custom-destination: https://www.metabase.com/help/premium + hide-stacktraces: false http-channel-host-strategy: external-only humanization-strategy: simple index-update-thread-count: 2 @@ -222,6 +223,13 @@ config: query-caching-max-kb: 2000 query-caching-max-ttl: 3024000.0 redirect-all-requests-to-https: false + remote-sync-auto-import: false + remote-sync-auto-import-rate: 5 + remote-sync-branch: null + remote-sync-task-time-limit-ms: 300000 + remote-sync-token: null + remote-sync-type: production + remote-sync-url: null report-timezone: null reset-token-ttl-hours: 48 retry-initial-interval: 500 diff --git a/_docs/v0.57/configuring-metabase/environment-variables.md b/_docs/v0.57/configuring-metabase/environment-variables.md index ce3319a144..4e39640bea 100644 --- a/_docs/v0.57/configuring-metabase/environment-variables.md +++ b/_docs/v0.57/configuring-metabase/environment-variables.md @@ -114,7 +114,7 @@ Allowed iframe hosts. - Default: `true` - [Configuration file name](./config-file): `anon-tracking-enabled` -Enable the collection of anonymous usage data to help Metabase improve. +Enable the collection of anonymous usage data in order to help Metabase improve. ### `MB_API_KEY` @@ -372,7 +372,7 @@ Whether dashboards should default to a user's last used parameters on load. - Type: integer - Default: `10000` -Consider metabase.driver/can-connect? / can-connect-with-details? to have failed if they were unable to +Consider metabase.driver/can-connect? / can-connect-with-details? to have failed if they were not able to successfully connect after this many milliseconds. By default, this is 10 seconds. Timeout in milliseconds for connecting to databases, both Metabase application database and data connections. @@ -451,7 +451,7 @@ The name you want to use for the sender of emails. - [Configuration file name](./config-file): `email-max-recipients-per-second` The maximum number of recipients, summed across emails, that can be sent per second. - Note that the final email sent before reaching the limit can exceed it, if it has multiple recipients. + Note that the final email sent before reaching the limit is able to exceed it, if it has multiple recipients. ### `MB_EMAIL_REPLY_TO` @@ -754,6 +754,14 @@ Keyword setting to control whitelabeling of the help link. Valid values are `:me Custom URL for the help link. +### `MB_HIDE_STACKTRACES` + +- Type: boolean +- Default: `false` +- [Configuration file name](./config-file): `hide-stacktraces` + +Prevent the exception middleware from including stacktraces in responses. + ### `MB_HTTP_CHANNEL_HOST_STRATEGY` - Type: keyword @@ -1244,7 +1252,7 @@ Indicates whether Metabase is running behind a proxy that sets the source-addres By default "Site Url" is used in notification links, but can be overridden. The base URL where dashboard notitification links will point to instead of the Metabase base URL. - Only applicable for users who use interactive embedding and subscriptions. + Only applicable for users who utilize interactive embedding and subscriptions. ### `MB_NOTIFICATION_SYSTEM_EVENT_THREAD_POOL_SIZE` @@ -1313,6 +1321,62 @@ The absolute maximum time to keep any cached query results, in seconds. Force all traffic to use HTTPS via a redirect, if the site URL is HTTPS. +### `MB_REMOTE_SYNC_AUTO_IMPORT` + +- Type: boolean +- Default: `false` +- [Configuration file name](./config-file): `remote-sync-auto-import` + +Whether to automatically import from the remote git repository. Only applies if remote-sync-type is :production. + +### `MB_REMOTE_SYNC_AUTO_IMPORT_RATE` + +- Type: integer +- Default: `5` +- [Configuration file name](./config-file): `remote-sync-auto-import-rate` + +If remote-sync-type is :production and remote-sync-auto-import is true, the rate (in minutes) at which to check for updates to import. Defaults to 5. + +### `MB_REMOTE_SYNC_BRANCH` + +- Type: string +- Default: `null` +- [Configuration file name](./config-file): `remote-sync-branch` + +The remote branch to sync with, e.g. `main`. + +### `MB_REMOTE_SYNC_TASK_TIME_LIMIT_MS` + +- Type: integer +- Default: `300000` +- [Configuration file name](./config-file): `remote-sync-task-time-limit-ms` + +The maximum amount of time a remote sync task will be given to complete. + +### `MB_REMOTE_SYNC_TOKEN` + +- Type: string +- Default: `null` +- [Configuration file name](./config-file): `remote-sync-token` + +An Authorization Bearer token allowing access to the git repo over HTTP. + +### `MB_REMOTE_SYNC_TYPE` + +- Type: keyword +- Default: `production` +- [Configuration file name](./config-file): `remote-sync-type` + +Git synchronization type - :development or :production. + +### `MB_REMOTE_SYNC_URL` + +- Type: string +- Default: `null` +- [Configuration file name](./config-file): `remote-sync-url` + +The location of your git repository, e.g. https://github.com/acme-inco/metabase.git. + ### `MB_REPORT_TIMEZONE` - Type: string @@ -1673,7 +1737,7 @@ When enabled, we show users a button to authenticate with Google to import data - [Exported as](../installation-and-operation/serialization): `show-homepage-data`. - [Configuration file name](./config-file): `show-homepage-data` -Whether or not to display data on the homepage. Admins might turn this off to direct users to better content than raw data. +Whether or not to display data on the homepage. Admins might turn this off in order to direct users to better content than raw data. ### `MB_SHOW_HOMEPAGE_XRAYS` @@ -2135,7 +2199,7 @@ Type: integer
Default: `600000`
Since: v35.0 -Timeout of Jetty async threads, defined in milliseconds. The default is 10 minutes. Few things might reach that timeout, since they return some type of data before, but things like CSV downloads might. +Timeout of Jetty async threads, defined in milliseconds. The default is 10 minutes. Very few things might reach that timeout, since they return some type of data before, but things like CSV downloads might. ### `MB_JETTY_DAEMON` diff --git a/_docs/v0.57/data-modeling/model-persistence.md b/_docs/v0.57/data-modeling/model-persistence.md index 4b0df77e5f..8d5281e5d8 100644 --- a/_docs/v0.57/data-modeling/model-persistence.md +++ b/_docs/v0.57/data-modeling/model-persistence.md @@ -11,14 +11,22 @@ layout: new-docs # Model persistence -> Currently available for PostgreSQL, MySQL, and Redshift. - Metabase can persist the results of your models so that your models (and the questions based on those models) load faster. Metabase will store model results in tables in a bespoke schema in your data warehouse (not the Metabase application database). When people ask questions based on your models, Metabase will use the tables with the stored results instead of re-running the model's query. > Model persistence doesn't work with [row and column security](../permissions/row-and-column-security) or [impersonation](../permissions/impersonation). +## Databases that support model persistence + +Currently, model persistence is only available for the following databases: + +- PostgreSQL +- MySQL +- Redshift + +Model persistence doesn't work with [row and column security](../permissions/row-and-column-security) or [impersonation](../permissions/impersonation). + ## Turn on model persistence in Metabase To persist models for faster loading, you'll need to turn on model persistence for: diff --git a/_docs/v0.57/embedding/sdk/dashboards.md b/_docs/v0.57/embedding/sdk/dashboards.md index 031506fd96..34e64f5728 100644 --- a/_docs/v0.57/embedding/sdk/dashboards.md +++ b/_docs/v0.57/embedding/sdk/dashboards.md @@ -136,6 +136,10 @@ If you want to replace the existing menu with your own component, you can do so {% include_file "{{ dirname }}/snippets/dashboards/plugins.tsx" snippet="example-custom-actions-menu" %} ``` +### `mapQuestionClickActions` + +You can customize what happens when people click on a data point on a dashboard with the `mapQuestionClickActions` plugin. See [mapQuestionClickActions](./questions#mapquestionclickactions). + ## Creating dashboards Creating a dashboard could be done with `useCreateDashboardApi` hook or `CreateDashboardModal` component. diff --git a/_docs/v0.57/embedding/sdk/plugins.md b/_docs/v0.57/embedding/sdk/plugins.md index 3f64028974..90692fdafa 100644 --- a/_docs/v0.57/embedding/sdk/plugins.md +++ b/_docs/v0.57/embedding/sdk/plugins.md @@ -31,6 +31,43 @@ To use a plugin on a per-component basis, pass the plugin as a prop to the compo {% include_file "{{ dirname }}/snippets/plugins/component-plugins.tsx" snippet="example" %} ``` +## `handleLink` + +To customize what happens when people click a link in your embedded questions and dashboards, use the global plugin `handleLink`: + +```typescript +export default function App() { + const navigate = useNavigate(); // coming from whatever routing lib you're using + + const plugins = { + handleLink: (urlString: string) => { + const url = new URL(urlString, window.location.origin); + const isInternal = url.origin === window.location.origin; + if (isInternal) { + // client side navigation + navigate(url.pathname + url.search + url.hash); + + return { handled: true }; // prevent default navigation + } + return { handled: false }; // let the sdk do the default behavior + }, + }; + + return ( + + +
+ +
+
+ ); +} +``` + ## Further reading - [Interactive question plugins](./questions#interactive-question-plugins) diff --git a/_docs/v0.57/embedding/sdk/questions.md b/_docs/v0.57/embedding/sdk/questions.md index 8b7d610cf7..80c2111f94 100644 --- a/_docs/v0.57/embedding/sdk/questions.md +++ b/_docs/v0.57/embedding/sdk/questions.md @@ -131,8 +131,27 @@ You can use [plugins](./plugins) to add custom functionality to your questions. ### `mapQuestionClickActions` -This plugin allows you to add custom actions to the click-through menu of an interactive question. You can add and -customize the appearance and behavior of the custom actions. +When people click on a data point in the embedded interactive chart, Metabase shows them a menu of actions by default. The plugin `mapQuestionClickActions` allows you to customize this behavior. You can choose to: + +- Open the default Metabase menu. +- Add custom actions to that click-through menu. +- Perform immediate action without opening a menu. + +Use `mapQuestionClickActions` globally at the provider level, or on individual `InteractiveQuestion` or `InteractiveDashboard` components. For more on provider scope, see [Plugins](./plugins) + +The example below shows all the options for click action behavior. This example will: + +- Open a menu with custom actions when "Last Name" column is clicked. +- Perform an immediate action (show an alert) when the "Plan" column is clicked. +- Shows the default menu (available as `clickActions`) in all other cases. + +The behavior is determined by what `mapQuestionClickActions` returns: array of actions to open a menu, or a single action to trigger an immediate action. + +```typescript +{% include_file "{{ dirname }}/snippets/questions/interactive-question-click-actions.tsx" snippet="example" %} +``` + +You can also customize the appearance of custom actions in the click menu. The example below shows an example of a click menu with default actions, a custom action, and a custom action with customized appearance: ```typescript {% include_file "{{ dirname }}/snippets/questions/interactive-question-plugins.tsx" snippet="example" %} diff --git a/_docs/v0.57/embedding/sdk/snippets/questions/interactive-question-click-actions.tsx b/_docs/v0.57/embedding/sdk/snippets/questions/interactive-question-click-actions.tsx new file mode 100644 index 0000000000..5dbf82636a --- /dev/null +++ b/_docs/v0.57/embedding/sdk/snippets/questions/interactive-question-click-actions.tsx @@ -0,0 +1,46 @@ +import { + defineMetabaseAuthConfig, + InteractiveQuestion, + MetabaseProvider, +} from "@metabase/embedding-sdk-react"; + +const authConfig = defineMetabaseAuthConfig({ + metabaseInstanceUrl: "http://localhost:3000", +}); + +const Example = () => { + return ( + // [] + { + if (clicked?.column?.display_name === "Last Name") { + // This adds a custom action to the menu when clicked on on "Last Name" column + return [ + ...clickActions, + { + buttonType: "horizontal", + name: "custom", + title: "This is the Last Name column", + onClick: () => alert("You clicked the Last Name column!"), + }, + ]; + } + + if (clicked?.column?.display_name === "Plan") { + // This performs an immediate action on "Plan" column instead of opening the menu + return { + onClick: () => alert("You clicked the Plan column!"), + }; + } + // default behavior (open Metabase's default click menu) on other columns + return clickActions; + }, + }} + > + + + ); + // [] +}; diff --git a/_docs/v0.57/installation-and-operation/remote-sync.md b/_docs/v0.57/installation-and-operation/remote-sync.md index ff634ad93c..baa5d0b8a6 100644 --- a/_docs/v0.57/installation-and-operation/remote-sync.md +++ b/_docs/v0.57/installation-and-operation/remote-sync.md @@ -376,6 +376,21 @@ In Production mode, you can set Metabase to auto-sync changes from your main bra By default, Metabase will pull any changes (if any) from the branch you specify every five minutes. You can also manually sync as needed. +## Disabling Remote Sync + +To disable Remote Sync, go to the Remote Sync settings page in Admin settings. + +To disable Remote Sync: + +1. Go to **Admin settings** > **Settings** > **Remote sync**. +2. Click **Disable Remote Sync**. +3. In the confirmation dialog, click **Disable**. + +- All remote sync settings are cleared, including the repository URL, access token, and branch information. +- Your synced collection and its content remain in your Metabase (they're not deleted). +- The synced collection becomes a regular collection that you can edit like any other collection. +- You can re-enable Remote Sync later by reconnecting to a repository, but any changes you made to the collection after disabling can be overwritten if you enable sync again. + ## Migrating existing content to Remote Sync If you already have content in your Metabase, you can gradually adopt Remote Sync. Content that lives outside the synced collection remains unaffected—you can continue working with it normally while you migrate content into the synced collection over time. diff --git a/_docs/v0.57/people-and-groups/account-settings.md b/_docs/v0.57/people-and-groups/account-settings.md index b78158bc28..f8739686f2 100644 --- a/_docs/v0.57/people-and-groups/account-settings.md +++ b/_docs/v0.57/people-and-groups/account-settings.md @@ -24,6 +24,8 @@ You can set your first and last names, change your email address, and set your l You can choose to display Metabase in light or dark mode. +To quickly toggle dark mode, use the [command palette](../exploration-and-organization/exploration#command-palette). + The theme only applies to your account. The theme doesn't apply to chart colors or embedded Metabases. ## Account password @@ -49,4 +51,4 @@ This isn't an in-Metabase setting, but just so you know: you can disable UI anim If you subscribe or are added to dashboard subscriptions or alerts, you’ll be able to manage those notifications here (as well as on the relevant question or dashboard themselves). -Metabase excludes notificatione for [comments](../documents/introduction#comment-notifications) from this page. +Metabase excludes notifications for [comments](../documents/introduction#comment-notifications) from this page. diff --git a/_site/docs/v0.57/CONTRIBUTING.html b/_site/docs/v0.57/CONTRIBUTING.html index a7a0261e7a..67ec3eb707 100644 --- a/_site/docs/v0.57/CONTRIBUTING.html +++ b/_site/docs/v0.57/CONTRIBUTING.html @@ -283,7 +283,7 @@
Embedded Analytics
- Features + Features @@ -552,7 +552,7 @@
Embedded Analytics