Warehouse

Get warehouse

Returns the platform and the settings of the current workspace's warehouse.

Request

No parameters.

Response

  • platform

    string

    The data warehouse platform. By default, Krenalis includes PostgreSQL and Snowflake.

  • settings

    object with json values

    The settings of the data warehouse.

  • mcpSettings

    nullable object with json values

    The read-only settings of the data warehouse that are used for accessing it from the MCP (Model Context Protocol) server.

    When null, it means that the MCP server settings aren't configured, so the MCP tools cannot be used for this workspace.

GET /v1/warehouse
curl https://example.com/v1/warehouse \
-H "Authorization: Bearer api_xxxxxxx"
Response
{
  "platform": "Snowflake",
  "settings": {
    "Username": "ingest_user",
    "Password": "T7v@pL92#kmQ",
    "Account": "acme-eu-west-12345",
    "Warehouse": "INGEST_WH",
    "Database": "ANALYTICS",
    "Schema": "EVENTS",
    "Role": "INGEST_ROLE"
  },
  "mcpSettings": null
}
Errors
404
workspace does not exist

Update warehouse

Updates the warehouse of the current workspace.

Request

  • settings

    object with json values Required

    The settings of the data warehouse.

    PostgreSQL

    • host

      string Required : Hostname or IP address of the server.
    • port

      int Required : Port number.
    • username

      string Required : Username.
    • password

      string : Password.
    • database

      string Required : Name of the database.
    • schema

      string Required : Name of the schema within the database.

    Snowflake

    • account

      string Required : Account identifier.
    • username

      string Required : Username.
    • password

      string Required : Password.
    • role

      string Required : Role that will be used for accessing the data.
    • database

      string Required : Name of the database.
    • schema

      string Required : Name of the schema within the database.
    • warehouse

      string Required : Name of the virtual warehouse.
  • mcpSettings

    nullable object with json values

    The settings of the data warehouse that are used for accessing it from the MCP (Model Context Protocol) server.

    See the settings parameter for the accepted fields.

    When provided, these settings must refer to a read-only access to the data warehouse; this is a security requirement to prevent the MCP client from performing destructive operations on the warehouse data by mistake.

    If not passed or null, the MCP server settings aren't configured, preventing the use of MCP tools for this workspace.

  • mode

    string

    The mode of the data warehouse. If not specified, the default is "Normal".

    Possible values: "Normal", "Inspection" or "Maintenance".
  • cancelIncompatibleOperations

    boolean

    Indicates whether operations currently running on the warehouse that are incompatible with the passed mode must be canceled.

Response

No response.
PUT /v1/warehouse
curl -X PUT https://example.com/v1/warehouse \
-H "Authorization: Bearer api_xxxxxxx" \
--json '{
"settings": {
"account": "ABCDEFG-TUVWXYZ",
"username": "USERNAME",
"password": "password",
"role": "CUSTOM_ROLE",
"database": "MY_DATABASE",
"schema": "PUBLIC",
"warehouse": "COMPUTE_WH"
},
"mcpSettings": null,
"mode": "Normal"
}'
Errors
404
workspace does not exist
422
data warehouse is a different data warehouse
422
data warehouse settings are not valid
422
warehouse MCP settings are not read-only

Test warehouse update

Tests the update of the warehouse of the current workspace.

If the settings are incorrect or the warehouse can't be accessed with the given settings, an error will be returned. If no error occurs, the settings are valid.

Request

  • settings

    object with json values Required

    The settings of the data warehouse.

  • mcpSettings

    nullable object with json values

    The settings of the data warehouse that are used for accessing it from the MCP (Model Context Protocol) server.

    See the settings parameter for the accepted fields.

    When provided, these settings must refer to a read-only access to the data warehouse; this is a security requirement to prevent the MCP client from performing destructive operations on the warehouse data by mistake.

    If not passed or null, the MCP server settings aren't configured, preventing the use of MCP tools for this workspace.

Response

No response.
PUT /v1/warehouse/test
curl -X PUT https://example.com/v1/warehouse/test \
-H "Authorization: Bearer api_xxxxxxx" \
--json '{
"settings": {
"Username": "ingest_user",
"Password": "T7v@pL92#kmQ",
"Account": "acme-eu-west-12345",
"Warehouse": "INGEST_WH",
"Database": "ANALYTICS",
"Schema": "EVENTS",
"Role": "INGEST_ROLE"
},
"mcpSettings": null
}'
Errors
404
workspace does not exist
422
data warehouse is a different data warehouse
422
data warehouse settings are not valid
422
warehouse MCP settings are not read-only

Update warehouse mode

Updates the mode of the current workspace's data warehouse.

Request

  • mode

    string

    The mode of the data warehouse. If not specified, the default is "Normal".

    Possible values: "Normal", "Inspection" or "Maintenance".
  • cancelIncompatibleOperations

    boolean

    Indicates whether operations currently running on the warehouse that are incompatible with the passed mode must be canceled.

Response

No response.
PUT /v1/warehouse/mode
curl -X PUT https://example.com/v1/warehouse/mode \
-H "Authorization: Bearer api_xxxxxxx" \
--json '{
"mode": "Normal"
}'
Errors
404
workspace does not exist

Repair warehouse

Repairs the current workspace's warehouse.

This endpoint can be called when neither identity resolution nor alter schema operations are running on the data warehouse.

Request

No parameters.

Response

No response.
POST /v1/warehouse/repair
curl -X POST https://example.com/v1/warehouse/repair \
-H "Authorization: Bearer api_xxxxxxx"
Errors
404
workspace does not exist

List warehouse platforms

Returns a list of warehouse platforms that can be used for a workspace warehouse.

Request

No parameters.

Response

  • platforms

    array of object
    • name

      string

      The name of the warehouse platform

GET /v1/warehouse/platforms
curl https://example.com/v1/warehouse/platforms \
-H "Authorization: Bearer api_xxxxxxx"
Response
{
  "platforms": [
    {
      "name": "PostgreSQL"
    },
    {
      "name": "Snowflake"
    }
  ]
}