Skip to content

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

Auto-update documentation for master (#74686)

github-automation-metabasecda6cc0581d6
diff --git a/docs/api.json b/docs/api.json
index f193ed85126..1088aa92b0d 100644
--- a/docs/api.json
+++ b/docs/api.json
@@ -3490,20 +3490,38 @@
"required" : [ "name", "base_type", "display_name" ]
},
"metabase.agent-api.api.construct-query-request" : {
- "description" : "Request body for /v2/construct-query and the fresh-query branch of /v2/query.\n A single `:query` key whose value is a JSON object matching\n [[metabase.lib.schema/external-query]] — the canonical portable MBQL 5 wire format. The\n query is fully self-describing: the database is derived from the first stage's\n `source-table:` or `source-card:`, all field references are portable FKs\n (`[<db-name>, <schema>, <table-name>, <column-name>]`), and there is no auxiliary\n `source_entity` / `referenced_entities` envelope. See\n `resources/metabot/prompts/tools/construct_notebook_query.md` for the full format reference\n (including operators, joins, expressions, multi-stage queries, and FK conventions).\n\n Closed map: any extra top-level keys (notably the legacy `source_entity` /\n `referenced_entities` envelope from before the repr migration) are rejected with a 400 so\n callers don't silently send fields the server ignores.",
+ "description" : "Request body for /v2/construct-query and the fresh-query branch of /v2/query.\n A single `:query` key whose value is a JSON object matching\n [[metabase.lib.schema/external-query]] — the canonical portable MBQL 5 wire format. The\n query is fully self-describing: the database is derived from the first stage's\n `source-table:` or `source-card:`, all field references are portable FKs\n (`[<db-name>, <schema>, <table-name>, <column-name>]`), and there is no auxiliary\n `source_entity` / `referenced_entities` envelope. See\n `resources/metabot/prompts/tools/construct_notebook_query.md` for the full format reference\n (including operators, joins, expressions, multi-stage queries, and FK conventions).\n\n Closed map: any extra top-level keys (notably the legacy `source_entity` /\n `referenced_entities` envelope from before the repr migration) are rejected with a 400 so\n callers don't silently send fields the server ignores.\n\n The inner `:query` value is intentionally typed as a plain `:map` at this boundary rather\n than `::lib.schema/external-query`. Reasons:\n\n 1. Deep MBQL-shape validation runs inside the representations pipeline\n (`metabot.tools.construct/execute-representations-query` calls `repr/validate-query`\n after the repair pass), so the boundary check would be redundant.\n\n 2. The strict-tool manifest lint (`assert-optional-fields-nullable!`) walks every map\n reachable from the tool input schema. `::external-query` references `::query`, which\n carries several `:optional` keys (`:lib/metadata`, `:database`, `:settings`, …) that\n are not `[:maybe ...]` — for sound reasons unrelated to this endpoint. Recursing into\n them would force a wide schema change just to satisfy the lint at the agent boundary.",
"type" : "object",
"properties" : {
+ "prompt" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1,
+ "maxLength" : 10000
+ }, {
+ "type" : "null"
+ } ]
+ },
"query" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.external-query"
+ "type" : "object",
+ "properties" : { }
}
},
"required" : [ "query" ],
"additionalProperties" : false
},
"metabase.agent-api.api.construct-query-response" : {
- "description" : "Response containing a base64-encoded MBQL query for use with /v1/execute.",
+ "description" : "Response containing a base64-encoded MBQL query for use with /v1/execute. The optional\n `:prompt` echoes the request's prompt back so the MCP layer can store it with the\n handle (see `metabase.mcp.tools/make-store-construct-query-result`).",
"type" : "object",
"properties" : {
+ "prompt" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
"query" : {
"type" : "string",
"minLength" : 1
@@ -5319,7 +5337,7 @@
},
"metabase.driver.connection.connection-type" : {
"type" : "string",
- "enum" : [ "default", "write-data" ]
+ "enum" : [ "default", "write-data", "admin", "transform" ]
},
"metabase.embedding-rest.api.theme.EmbeddingTheme" : {
"type" : "object",
@@ -6275,8 +6293,7 @@
"lib/uuid" : {
"type" : "string",
"minLength" : 36,
- "maxLength" : 36,
- "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid"
+ "maxLength" : 36
},
"name" : {
"oneOf" : [ {
@@ -8569,10 +8586,6 @@
"metabase.lib.schema.expression.window..offset.n" : {
"type" : "integer"
},
- "metabase.lib.schema.external-query" : {
- "description" : "Schema for \"External MBQL\" 5 query.",
- "$ref" : "#/components/schemas/metabase.lib.schema.query"
- },
"metabase.lib.schema.fields" : {
"allOf" : [ {
"type" : "array",
@@ -8670,13 +8683,6 @@
"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.schema" : {
- "anyOf" : [ {
- "type" : "null"
- }, {
- "type" : "string"
- } ]
- },
"metabase.lib.schema.id.segment" : {
"description" : "Valid legacy Segment ID",
"type" : "integer",
@@ -9830,16 +9836,6 @@
"type" : "null"
} ]
},
- "hour-distribution" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent"
- }
- }, {
- "type" : "null"
- } ]
- },
"latest" : {
"oneOf" : [ {
"type" : "string"
@@ -9867,16 +9863,6 @@
}, {
"type" : "null"
} ]
- },
- "weekday-distribution" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent"
- }
- }, {
- "type" : "null"
- } ]
}
}
},
@@ -9884,14 +9870,14 @@
"description" : "Schema for fingerprint information for Fields deriving from `:type/Text`.",
"type" : "object",
"properties" : {
- "mode-fraction" : {
+ "average-length" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent"
+ "type" : "number"
}, {
"type" : "null"
} ]
},
- "percent-json" : {
+ "mode-fraction" : {
"oneOf" : [ {
"$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent"
}, {
@@ -9905,44 +9891,30 @@
"type" : "null"
} ]
},
- "percent-url" : {
+ "percent-email" : {
"oneOf" : [ {
"$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent"
}, {
"type" : "null"
} ]
},
- "percent-state" : {
+ "percent-json" : {
"oneOf" : [ {
"$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent"
}, {
"type" : "null"
} ]
},
- "percent-email" : {
+ "percent-state" : {
"oneOf" : [ {
"$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent"
}, {
"type" : "null"
} ]
},
- "max-length" : {
- "oneOf" : [ {
- "type" : "number"
- }, {
- "type" : "null"
- } ]
- },
- "average-length" : {
- "oneOf" : [ {
- "type" : "number"
- }, {
- "type" : "null"
- } ]
- },
- "min-length" : {
+ "percent-url" : {
"oneOf" : [ {
- "type" : "number"
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent"
}, {
"type" : "null"
} ]
@@ -21565,6 +21537,15 @@
"type" : "null"
} ]
},
+ "admin_details" : {
+ "oneOf" : [ {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
"refingerprint" : {
"oneOf" : [ {
"type" : "boolean"
@@ -22519,7 +22500,7 @@
"post" : {
"operationId" : "post-api-dataset-native",
"summary" : "POST /api/dataset/native",
- "description" : "Fetch a native version of an MBQL query.",
+ "description" : "Fetch a native version of an MBQL query.\n\n Display path: workspace remapping is suppressed via\n [[ws.table-remapping/with-display-context]] so the user sees canonical-schema SQL\n in the 'Show me the SQL' panel. The query still executes against the workspace\n isolation schema at warehouse time (separate code path); this endpoint only\n affects what the user reads.",
"parameters" : [ ],
"responses" : {
"2XX" : {
@@ -27302,7 +27283,7 @@
"schema" : {
"oneOf" : [ {
"type" : "string",
- "enum" : [ "created_at", "message_count", "total_tokens" ]
+ "enum" : [ "created_at", "message_count", "total_tokens", "user", "profile_id", "ip_address" ]
}, {
"type" : "null"
} ]
@@ -31396,6 +31377,1258 @@
"tags" : [ "/api/ee/upload-management" ]
}
},
+ "/api/ee/workspace-instance/current" : {
+ "get" : {
+ "operationId" : "get-api-ee-workspace-instance-current",
+ "summary" : "GET /api/ee/workspace-instance/current",
+ "description" : "Read-only summary of the workspace loaded on this instance.\n\n Reads from the in-process atom populated at boot by the `:workspace` section of\n `config.yml`. Returns `nil` when no workspace was loaded — i.e. this is a manager-only\n instance, or no `config.yml` was present at boot.",
+ "parameters" : [ ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "databases" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "object",
+ "properties" : {
+ "input_schemas" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ },
+ "output" : {
+ "type" : "object",
+ "properties" : {
+ "db" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }
+ }
+ },
+ "required" : [ "input_schemas", "output" ]
+ }
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ },
+ "required" : [ "name", "databases" ]
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }
+ }
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/ee/workspace-instance" ]
+ }
+ },
+ "/api/ee/workspace-instance/table-remappings" : {
+ "get" : {
+ "operationId" : "get-api-ee-workspace-instance-table-remappings",
+ "summary" : "GET /api/ee/workspace-instance/table-remappings",
+ "description" : "Return all table remappings, ordered by id.",
+ "parameters" : [ ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "from_db" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "to_table_name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "database_id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.database"
+ },
+ "to_db" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "created_at" : { },
+ "from_schema" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "from_table_name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "to_schema" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "id", "database_id", "from_db", "from_schema", "from_table_name", "to_db", "to_schema", "to_table_name", "created_at" ]
+ }
+ }
+ }
+ }
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/ee/workspace-instance" ]
+ }
+ },
+ "/api/ee/workspace-manager" : {
+ "get" : {
+ "operationId" : "get-api-ee-workspace-manager",
+ "summary" : "GET /api/ee/workspace-manager",
+ "description" : "List all Workspaces.",
+ "parameters" : [ ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "created_at" : {
+ "anyOf" : [ { }, { } ]
+ },
+ "creator" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "common_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "email" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "first_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "last_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "id", "first_name", "last_name", "email" ],
+ "additionalProperties" : false
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "databases" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "database_id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.database"
+ },
+ "input_schemas" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ },
+ "output_namespace" : {
+ "type" : "string"
+ },
+ "status" : {
+ "type" : "string",
+ "enum" : [ "unprovisioned", "provisioning", "provisioned", "deprovisioning" ]
+ }
+ },
+ "required" : [ "database_id", "input_schemas", "output_namespace", "status" ],
+ "additionalProperties" : false
+ }
+ },
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "updated_at" : {
+ "anyOf" : [ { }, { } ]
+ }
+ },
+ "required" : [ "id", "name", "creator", "created_at", "updated_at" ],
+ "additionalProperties" : false
+ }
+ }
+ }
+ }
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/ee/workspace-manager" ]
+ },
+ "post" : {
+ "operationId" : "post-api-ee-workspace-manager",
+ "summary" : "POST /api/ee/workspace-manager",
+ "description" : "Create a new Workspace (name only, no databases).",
+ "parameters" : [ ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "created_at" : {
+ "anyOf" : [ { }, { } ]
+ },
+ "creator" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "common_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "email" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "first_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "last_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "id", "first_name", "last_name", "email" ],
+ "additionalProperties" : false
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "databases" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "database_id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.database"
+ },
+ "input_schemas" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ },
+ "output_namespace" : {
+ "type" : "string"
+ },
+ "status" : {
+ "type" : "string",
+ "enum" : [ "unprovisioned", "provisioning", "provisioned", "deprovisioning" ]
+ }
+ },
+ "required" : [ "database_id", "input_schemas", "output_namespace", "status" ],
+ "additionalProperties" : false
+ }
+ },
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "updated_at" : {
+ "anyOf" : [ { }, { } ]
+ }
+ },
+ "required" : [ "id", "name", "creator", "created_at", "updated_at" ],
+ "additionalProperties" : false
+ }
+ }
+ }
+ },
+ "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" ],
+ "additionalProperties" : false
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ee/workspace-manager" ]
+ }
+ },
+ "/api/ee/workspace-manager/{id}" : {
+ "get" : {
+ "operationId" : "get-api-ee-workspace-manager-id",
+ "summary" : "GET /api/ee/workspace-manager/{id}",
+ "description" : "Get a single Workspace 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",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "created_at" : {
+ "anyOf" : [ { }, { } ]
+ },
+ "creator" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "common_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "email" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "first_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "last_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "id", "first_name", "last_name", "email" ],
+ "additionalProperties" : false
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "databases" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "database_id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.database"
+ },
+ "input_schemas" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ },
+ "output_namespace" : {
+ "type" : "string"
+ },
+ "status" : {
+ "type" : "string",
+ "enum" : [ "unprovisioned", "provisioning", "provisioned", "deprovisioning" ]
+ }
+ },
+ "required" : [ "database_id", "input_schemas", "output_namespace", "status" ],
+ "additionalProperties" : false
+ }
+ },
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "updated_at" : {
+ "anyOf" : [ { }, { } ]
+ }
+ },
+ "required" : [ "id", "name", "creator", "created_at", "updated_at" ],
+ "additionalProperties" : false
+ }
+ }
+ }
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/ee/workspace-manager" ]
+ },
+ "put" : {
+ "operationId" : "put-api-ee-workspace-manager-id",
+ "summary" : "PUT /api/ee/workspace-manager/{id}",
+ "description" : "Update a workspace's 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",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "created_at" : {
+ "anyOf" : [ { }, { } ]
+ },
+ "creator" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "common_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "email" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "first_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "last_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "id", "first_name", "last_name", "email" ],
+ "additionalProperties" : false
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "databases" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "database_id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.database"
+ },
+ "input_schemas" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ },
+ "output_namespace" : {
+ "type" : "string"
+ },
+ "status" : {
+ "type" : "string",
+ "enum" : [ "unprovisioned", "provisioning", "provisioned", "deprovisioning" ]
+ }
+ },
+ "required" : [ "database_id", "input_schemas", "output_namespace", "status" ],
+ "additionalProperties" : false
+ }
+ },
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "updated_at" : {
+ "anyOf" : [ { }, { } ]
+ }
+ },
+ "required" : [ "id", "name", "creator", "created_at", "updated_at" ],
+ "additionalProperties" : false
+ }
+ }
+ }
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ },
+ "additionalProperties" : false
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ee/workspace-manager" ]
+ },
+ "delete" : {
+ "operationId" : "delete-api-ee-workspace-manager-id",
+ "summary" : "DELETE /api/ee/workspace-manager/{id}",
+ "description" : "Delete a Workspace. Deprovisions all databases first (blocking).",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "id",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "deleted" : {
+ "type" : "boolean"
+ },
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }
+ },
+ "required" : [ "id", "deleted" ]
+ }
+ }
+ }
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/ee/workspace-manager" ]
+ }
+ },
+ "/api/ee/workspace-manager/{id}/config" : {
+ "get" : {
+ "operationId" : "get-api-ee-workspace-manager-id-config",
+ "summary" : "GET /api/ee/workspace-manager/{id}/config",
+ "description" : "Download the workspace's developer-instance config as a YAML file. 409 if any\n of the workspace's databases is not `:provisioned`.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "id",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "body" : {
+ "type" : "string"
+ },
+ "headers" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
+ },
+ "status" : {
+ "const" : 200
+ }
+ },
+ "required" : [ "status", "headers", "body" ]
+ }
+ }
+ }
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/ee/workspace-manager" ]
+ }
+ },
+ "/api/ee/workspace-manager/{id}/database" : {
+ "post" : {
+ "operationId" : "post-api-ee-workspace-manager-id-database",
+ "summary" : "POST /api/ee/workspace-manager/{id}/database",
+ "description" : "Add a database to a workspace and provision it immediately (blocking).",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "id",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "created_at" : {
+ "anyOf" : [ { }, { } ]
+ },
+ "creator" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "common_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "email" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "first_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "last_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "id", "first_name", "last_name", "email" ],
+ "additionalProperties" : false
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "databases" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "database_id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.database"
+ },
+ "input_schemas" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ },
+ "output_namespace" : {
+ "type" : "string"
+ },
+ "status" : {
+ "type" : "string",
+ "enum" : [ "unprovisioned", "provisioning", "provisioned", "deprovisioning" ]
+ }
+ },
+ "required" : [ "database_id", "input_schemas", "output_namespace", "status" ],
+ "additionalProperties" : false
+ }
+ },
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "updated_at" : {
+ "anyOf" : [ { }, { } ]
+ }
+ },
+ "required" : [ "id", "name", "creator", "created_at", "updated_at" ],
+ "additionalProperties" : false
+ }
+ }
+ }
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "database_id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.database"
+ },
+ "input_schemas" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ }
+ },
+ "required" : [ "database_id", "input_schemas" ],
+ "additionalProperties" : false
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ee/workspace-manager" ]
+ }
+ },
+ "/api/ee/workspace-manager/{id}/database/{db-id}" : {
+ "put" : {
+ "operationId" : "put-api-ee-workspace-manager-id-database-db-id",
+ "summary" : "PUT /api/ee/workspace-manager/{id}/database/{db-id}",
+ "description" : "Update a database's input namespaces. Deprovisions the old config and reprovisions\n with the new one (blocking).",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "id",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
+ }, {
+ "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",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "created_at" : {
+ "anyOf" : [ { }, { } ]
+ },
+ "creator" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "common_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "email" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "first_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "last_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "id", "first_name", "last_name", "email" ],
+ "additionalProperties" : false
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "databases" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "database_id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.database"
+ },
+ "input_schemas" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ },
+ "output_namespace" : {
+ "type" : "string"
+ },
+ "status" : {
+ "type" : "string",
+ "enum" : [ "unprovisioned", "provisioning", "provisioned", "deprovisioning" ]
+ }
+ },
+ "required" : [ "database_id", "input_schemas", "output_namespace", "status" ],
+ "additionalProperties" : false
+ }
+ },
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "updated_at" : {
+ "anyOf" : [ { }, { } ]
+ }
+ },
+ "required" : [ "id", "name", "creator", "created_at", "updated_at" ],
+ "additionalProperties" : false
+ }
+ }
+ }
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "input_schemas" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ }
+ },
+ "required" : [ "input_schemas" ],
+ "additionalProperties" : false
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ee/workspace-manager" ]
+ },
+ "delete" : {
+ "operationId" : "delete-api-ee-workspace-manager-id-database-db-id",
+ "summary" : "DELETE /api/ee/workspace-manager/{id}/database/{db-id}",
+ "description" : "Deprovision and remove a database from a workspace (blocking).",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "id",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
+ }, {
+ "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",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "created_at" : {
+ "anyOf" : [ { }, { } ]
+ },
+ "creator" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "common_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "email" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "first_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "last_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "id", "first_name", "last_name", "email" ],
+ "additionalProperties" : false
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "databases" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "database_id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.database"
+ },
+ "input_schemas" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ },
+ "output_namespace" : {
+ "type" : "string"
+ },
+ "status" : {
+ "type" : "string",
+ "enum" : [ "unprovisioned", "provisioning", "provisioned", "deprovisioning" ]
+ }
+ },
+ "required" : [ "database_id", "input_schemas", "output_namespace", "status" ],
+ "additionalProperties" : false
+ }
+ },
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "updated_at" : {
+ "anyOf" : [ { }, { } ]
+ }
+ },
+ "required" : [ "id", "name", "creator", "created_at", "updated_at" ],
+ "additionalProperties" : false
+ }
+ }
+ }
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/ee/workspace-manager" ]
+ }
+ },
+ "/api/ee/workspace-manager/{id}/metadata/export" : {
+ "get" : {
+ "operationId" : "get-api-ee-workspace-manager-id-metadata-export",
+ "summary" : "GET /api/ee/workspace-manager/{id}/metadata/export",
+ "description" : "Stream the warehouse metadata (databases, tables, fields) for the workspace's databases,\n scoped to each database's `:input` namespaces. Same flag semantics as\n `/api/ee/serialization/metadata/export` — sections must be opted into via the\n `with-databases` / `with-tables` / `with-fields` query parameters.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "id",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
+ }, {
+ "in" : "query",
+ "name" : "with-databases",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "with-tables",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "with-fields",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.serialization.schema.export-metadata-response"
+ }
+ }
+ }
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/ee/workspace-manager" ]
+ }
+ },
"/api/eid-translation/translate" : {
"post" : {
"operationId" : "post-api-eid-translation-translate",
diff --git a/docs/configuring-metabase/environment-variables.md b/docs/configuring-metabase/environment-variables.md
index ae914465a96..a3337a428c4 100644
--- a/docs/configuring-metabase/environment-variables.md
+++ b/docs/configuring-metabase/environment-variables.md
@@ -87,9 +87,13 @@ Whether AI features are enabled.
- [Exported as](../installation-and-operation/serialization.md): `ai-usage-max-retention-days`.
- [Configuration file name](./config-file.md): `ai-usage-max-retention-days`
-Number of days to retain rows in the ai_usage_log table. Minimum value is 30; set to 0 to retain data indefinitely.
+Number of days to retain rows in the ai_usage_log, metabot_conversation, and metabot_message tables. Minimum value is 30; set to 0 to retain data indefinitely.
-Sets the maximum number of days Metabase preserves rows in the `ai_usage_log` table.
+Sets the maximum number of days Metabase preserves rows for the following application database tables:
+
+- `ai_usage_log`
+- `metabot_conversation`
+- `metabot_message`
Once a day, Metabase deletes rows older than this threshold. The minimum value is 30 days (Metabase will treat entered values of 1 to 29 the same as 30).
If set to 0, Metabase will keep all rows.
@@ -2198,7 +2202,9 @@ The timeout for a transform job, in minutes.
Controls the timeout for transform runs, including the queries they execute. This takes precedence
over MB_DB_QUERY_TIMEOUT_MINUTES for queries executed inside a transform, so transforms can run longer than regular
- Metabase queries.
+ Metabase queries. Enforced per-statement via `Statement.setQueryTimeout`; transforms also use a separate JDBC
+ connection pool whose c3p0 leak-detector tolerates this longer runtime, so non-transform connections continue to
+ use the shorter `MB_DB_QUERY_TIMEOUT_MINUTES` leak-detector.
### `MB_TRANSFORMS_ENABLED`