> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cube.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Create or update Databricks Metric View publication settings

Uses optimistic configuration versioning. Pass `expectedConfigurationVersion` 0 to create. Requires a Databricks datasource. This is currently in preview — reach out to the Cube support team to activate it for your account.


## OpenAPI

````yaml /api-reference/api.yaml put /api/v1/deployments/{deploymentId}/databricks-metric-view-integrations/{dataSourceName}
openapi: 3.1.0
info:
  title: Cube Platform API
  version: 1.0.0
  description: >-
    Programmatically manage Cube: deployments and everything scoped to them

    (environments, folders, reports, workbooks, notifications, workspace, and
    agents),

    plus account-level users, groups, policies, embedding, and AI settings.
    Data-model

    authoring, dev mode, branches, and uploads live under /build/api/v1 — same
    host and

    token, routed to the build pods.
servers:
  - url: https://{tenant}.cubecloud.dev
    description: Your tenant host. Replace the whole host if you use a custom domain.
    variables:
      tenant:
        default: your-tenant
        description: Your Cube tenant subdomain
security:
  - bearerAuth: []
tags:
  - name: Deployments
  - name: Deployment Creation
  - name: Environments
  - name: Env Variables
  - name: Regions
  - name: Data Model
  - name: Data Model Uploads
  - name: GitHub
  - name: GitHub Connection
  - name: dbt Sync
  - name: Databricks Metric View Publication
  - name: Databricks Metric View Integration
  - name: Folders
  - name: Reports
  - name: Workbooks
  - name: Dashboard Exports
  - name: Notifications
  - name: Workspace
  - name: Users
  - name: Users Admin
  - name: User Attributes
  - name: User Attribute Values
  - name: Tenant Settings
  - name: OAuth Integrations
  - name: User OAuth Tokens
  - name: OIDC Token Configs
  - name: App Theme
  - name: Embed
  - name: Embed Tenants
  - name: Dashboard Embed Access
  - name: Usage Analytics
  - name: OpenAPI Spec
paths:
  /api/v1/deployments/{deploymentId}/databricks-metric-view-integrations/{dataSourceName}:
    put:
      tags:
        - Databricks Metric View Integration
      summary: Create or update Databricks Metric View publication settings
      operationId: saveIntegration
      parameters:
        - in: path
          name: deploymentId
          required: true
          schema:
            type: integer
        - in: path
          name: dataSourceName
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveDatabricksMetricViewIntegrationInput'
        description: SaveDatabricksMetricViewIntegrationInput
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatabricksMetricViewIntegrationResponse'
          description: ''
components:
  schemas:
    SaveDatabricksMetricViewIntegrationInput:
      properties:
        deletionPolicy:
          $ref: >-
            #/components/schemas/SaveDatabricksMetricViewIntegrationInputDeletionPolicy
        enabled:
          type: boolean
        expectedConfigurationVersion:
          description: >-
            Use 0 to create; otherwise pass the configurationVersion returned by
            GET.
          minimum: 0
          type: integer
        selectionMode:
          $ref: >-
            #/components/schemas/SaveDatabricksMetricViewIntegrationInputSelectionMode
        sourceOverrides:
          type: object
          additionalProperties:
            type: string
        targetCatalog:
          maxLength: 255
          type: string
        targetNamePrefix:
          maxLength: 255
          type: string
        targetNames:
          type: object
          additionalProperties:
            type: string
        targetSchema:
          maxLength: 255
          type: string
        viewNameRegex:
          maxLength: 128
          type: string
        viewNames:
          items:
            type: string
          maxItems: 128
          type: array
      required:
        - expectedConfigurationVersion
        - enabled
        - targetCatalog
        - targetSchema
        - selectionMode
      type: object
    DatabricksMetricViewIntegrationResponse:
      properties:
        accessTest:
          oneOf:
            - type: object
            - type: 'null'
        configuration:
          $ref: >-
            #/components/schemas/DatabricksMetricViewIntegrationConfigurationResponse
        configurationVersion:
          type: integer
        createdAt:
          oneOf:
            - format: date
              type: string
            - format: date-time
              type: string
        dataSourceName:
          type: string
        deploymentId:
          type: integer
        publicId:
          type: string
        updatedAt:
          oneOf:
            - format: date
              type: string
            - format: date-time
              type: string
      required:
        - publicId
        - deploymentId
        - dataSourceName
        - configurationVersion
        - configuration
        - createdAt
        - updatedAt
      type: object
    SaveDatabricksMetricViewIntegrationInputDeletionPolicy:
      enum:
        - retain
        - delete-managed
      type: string
    SaveDatabricksMetricViewIntegrationInputSelectionMode:
      enum:
        - all
        - selected
        - pattern
      type: string
    DatabricksMetricViewIntegrationConfigurationResponse:
      properties:
        deletionPolicy:
          $ref: >-
            #/components/schemas/DatabricksMetricViewIntegrationConfigurationResponseDeletionPolicy
        enabled:
          type: boolean
        selectionMode:
          $ref: >-
            #/components/schemas/DatabricksMetricViewIntegrationConfigurationResponseSelectionMode
        sourceOverrides:
          oneOf:
            - type: object
              additionalProperties:
                type: string
            - type: 'null'
        targetCatalog:
          type: string
        targetNamePrefix:
          oneOf:
            - type: string
            - type: 'null'
        targetNames:
          oneOf:
            - type: object
              additionalProperties:
                type: string
            - type: 'null'
        targetSchema:
          type: string
        version:
          $ref: >-
            #/components/schemas/DatabricksMetricViewIntegrationConfigurationResponseVersion
        viewNameRegex:
          oneOf:
            - type: string
            - type: 'null'
        viewNames:
          oneOf:
            - items:
                type: string
              type: array
            - type: 'null'
      required:
        - version
        - enabled
        - targetCatalog
        - targetSchema
        - selectionMode
        - deletionPolicy
      type: object
    DatabricksMetricViewIntegrationConfigurationResponseDeletionPolicy:
      enum:
        - retain
        - delete-managed
      type: string
    DatabricksMetricViewIntegrationConfigurationResponseSelectionMode:
      enum:
        - all
        - selected
        - pattern
      type: string
    DatabricksMetricViewIntegrationConfigurationResponseVersion:
      enum:
        - 1
      type: number
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Token authentication. Send `Authorization: Bearer <YOUR_TOKEN>`.'

````