> ## 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.

# Publish dashboard



## OpenAPI

````yaml /api-reference/api.yaml post /v1/deployments/{deploymentId}/workbooks/{workbookId}/publish
openapi: 3.1.0
info:
  title: Cube Cloud REST API
  version: 1.0.0
  description: >-
    Programmatically manage Cube Cloud: deployments and everything scoped to
    them

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

    plus account-level users, groups, policies, embedding, and AI settings.
servers:
  - url: https://{tenant}.cubecloud.dev/api
    description: >-
      Cube Cloud API base URL. Replace the whole host if you use a custom
      domain.
    variables:
      tenant:
        default: your-tenant
        description: Your Cube Cloud tenant subdomain
security:
  - bearerAuth: []
tags:
  - name: Deployments
  - name: Environments
  - name: Folders
  - name: Reports
  - name: Workbooks
  - name: Notifications
  - name: Workspace
  - name: Embed
  - name: Embed Tenants
paths:
  /v1/deployments/{deploymentId}/workbooks/{workbookId}/publish:
    post:
      tags:
        - Workbooks
      summary: Publish dashboard
      operationId: publishDashboard
      parameters:
        - in: path
          name: deploymentId
          required: true
          schema:
            type: number
        - in: path
          name: workbookId
          required: true
          schema:
            type: number
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublishDashboardInput'
        description: PublishDashboardInput
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dashboard'
          description: ''
components:
  schemas:
    PublishDashboardInput:
      properties:
        config:
          oneOf:
            - $ref: '#/components/schemas/DashboardConfigInput'
            - type: 'null'
        dashboardId:
          oneOf:
            - type: integer
            - type: 'null'
        description:
          oneOf:
            - type: string
            - type: 'null'
        title:
          oneOf:
            - type: string
            - type: 'null'
        workbookId:
          type: integer
      required:
        - workbookId
      type: object
    Dashboard:
      properties:
        allowEmbed:
          type: boolean
        config:
          $ref: '#/components/schemas/DashboardConfig'
        createdBy:
          oneOf:
            - type: integer
            - type: 'null'
        deploymentId:
          type: integer
        description:
          oneOf:
            - type: string
            - type: 'null'
        id:
          type: integer
        publicId:
          type: string
        reportSnapshots:
          items:
            $ref: '#/components/schemas/ReportSnapshot'
          type: array
        status:
          $ref: '#/components/schemas/DashboardDtoStatus'
        title:
          oneOf:
            - type: string
            - type: 'null'
        versionId:
          type: integer
        versionNumber:
          type: integer
        workbookId:
          type: integer
      required:
        - id
        - publicId
        - deploymentId
        - workbookId
        - status
        - allowEmbed
        - config
        - versionNumber
        - versionId
        - reportSnapshots
      type: object
    DashboardConfigInput:
      properties:
        description:
          oneOf:
            - type: string
            - type: 'null'
        layout:
          oneOf:
            - $ref: '#/components/schemas/DashboardLayoutInput'
            - type: 'null'
        settings:
          oneOf:
            - type: object
              additionalProperties: true
            - type: 'null'
        theme:
          oneOf:
            - $ref: '#/components/schemas/DashboardThemeInput'
            - type: 'null'
        title:
          oneOf:
            - type: string
            - type: 'null'
        widgets:
          items:
            $ref: '#/components/schemas/DashboardWidgetInput'
          type: array
      required:
        - widgets
      type: object
    DashboardConfig:
      properties:
        description:
          oneOf:
            - type: string
            - type: 'null'
        layout:
          oneOf:
            - $ref: '#/components/schemas/DashboardLayout'
            - type: 'null'
        settings:
          oneOf:
            - type: object
              additionalProperties: true
            - type: 'null'
        theme:
          oneOf:
            - type: object
              additionalProperties: true
            - type: 'null'
        title:
          oneOf:
            - type: string
            - type: 'null'
        widgets:
          oneOf:
            - items:
                $ref: '#/components/schemas/DashboardWidget'
              type: array
            - type: 'null'
      type: object
    ReportSnapshot:
      properties:
        description:
          oneOf:
            - type: string
            - type: 'null'
        id:
          type: integer
        kind:
          oneOf:
            - $ref: '#/components/schemas/ReportSnapshotDtoKind'
            - type: 'null'
        meta:
          oneOf:
            - type: object
              additionalProperties: true
            - type: 'null'
        name:
          oneOf:
            - type: string
            - type: 'null'
        preferences:
          oneOf:
            - $ref: '#/components/schemas/ReportSnapshotPreferences'
            - type: 'null'
        reportId:
          type: integer
        spec:
          oneOf:
            - oneOf:
                - type: string
                - type: object
            - type: 'null'
        sqlQuery:
          oneOf:
            - type: string
            - type: 'null'
        title:
          oneOf:
            - type: string
            - type: 'null'
        versionNumber:
          type: integer
      required:
        - id
        - reportId
        - versionNumber
      type: object
    DashboardDtoStatus:
      enum:
        - draft
        - published
        - archived
      type: string
    DashboardLayoutInput:
      properties:
        breakpoints:
          oneOf:
            - $ref: '#/components/schemas/DashboardBreakpointsInput'
            - type: 'null'
        cols:
          oneOf:
            - $ref: '#/components/schemas/DashboardBreakpointColsInput'
            - type: 'null'
        containerPadding:
          oneOf:
            - items:
                type: integer
              type: array
            - type: 'null'
        margin:
          oneOf:
            - items:
                type: integer
              type: array
            - type: 'null'
        rowHeight:
          oneOf:
            - type: integer
            - type: 'null'
      type: object
    DashboardThemeInput:
      properties:
        backgroundColor:
          oneOf:
            - type: string
            - type: 'null'
        controls:
          oneOf:
            - $ref: '#/components/schemas/ControlThemeSectionInput'
            - type: 'null'
        dashboard:
          oneOf:
            - $ref: '#/components/schemas/DashboardThemeSectionInput'
            - type: 'null'
        fontFamily:
          oneOf:
            - type: string
            - type: 'null'
        primaryColor:
          oneOf:
            - type: string
            - type: 'null'
        themeId:
          oneOf:
            - type: string
            - type: 'null'
        widgets:
          oneOf:
            - $ref: '#/components/schemas/WidgetThemeSectionInput'
            - type: 'null'
      type: object
    DashboardWidgetInput:
      properties:
        config:
          oneOf:
            - type: object
              additionalProperties: true
            - type: 'null'
        id:
          type: string
        position:
          $ref: '#/components/schemas/DashboardWidgetPositionInput'
        responsiveLayouts:
          oneOf:
            - $ref: '#/components/schemas/DashboardResponsiveLayoutsInput'
            - type: 'null'
        style:
          oneOf:
            - type: object
              additionalProperties: true
            - type: 'null'
        type:
          $ref: '#/components/schemas/DashboardWidgetInputType'
      required:
        - id
        - type
        - position
      type: object
    DashboardLayout:
      properties:
        breakpoints:
          oneOf:
            - $ref: '#/components/schemas/DashboardBreakpoints'
            - type: 'null'
        cols:
          oneOf:
            - $ref: '#/components/schemas/DashboardBreakpointCols'
            - type: 'null'
        containerPadding:
          oneOf:
            - items:
                type: integer
              type: array
            - type: 'null'
        margin:
          oneOf:
            - items:
                type: integer
              type: array
            - type: 'null'
        rowHeight:
          oneOf:
            - type: integer
            - type: 'null'
      type: object
    DashboardWidget:
      properties:
        config:
          oneOf:
            - type: object
              additionalProperties: true
            - type: 'null'
        id:
          type: string
        position:
          $ref: '#/components/schemas/DashboardWidgetPosition'
        responsiveLayouts:
          oneOf:
            - $ref: '#/components/schemas/DashboardResponsiveLayouts'
            - type: 'null'
        style:
          oneOf:
            - type: object
              additionalProperties: true
            - type: 'null'
        type:
          $ref: '#/components/schemas/DashboardWidgetDtoType'
      required:
        - id
        - type
        - position
      type: object
    ReportSnapshotDtoKind:
      enum:
        - vega
        - table
        - kpi
        - html
        - map
      type: string
    ReportSnapshotPreferences:
      properties:
        columnFormats:
          oneOf:
            - type: object
              additionalProperties:
                $ref: '#/components/schemas/ColumnFormatOverride'
            - type: 'null'
      type: object
    DashboardBreakpointsInput:
      properties:
        lg:
          oneOf:
            - type: integer
            - type: 'null'
        md:
          oneOf:
            - type: integer
            - type: 'null'
        sm:
          oneOf:
            - type: integer
            - type: 'null'
        xs:
          oneOf:
            - type: integer
            - type: 'null'
        xxs:
          oneOf:
            - type: integer
            - type: 'null'
      title: DashboardBreakpointsInput
      type: object
    DashboardBreakpointColsInput:
      properties:
        lg:
          oneOf:
            - type: integer
            - type: 'null'
        md:
          oneOf:
            - type: integer
            - type: 'null'
        sm:
          oneOf:
            - type: integer
            - type: 'null'
        xs:
          oneOf:
            - type: integer
            - type: 'null'
        xxs:
          oneOf:
            - type: integer
            - type: 'null'
      title: DashboardBreakpointColsInput
      type: object
    ControlThemeSectionInput:
      properties:
        backgroundColor:
          oneOf:
            - type: string
            - type: 'null'
        border:
          oneOf:
            - $ref: '#/components/schemas/ControlThemeBorderSectionInput'
            - type: 'null'
        padding:
          oneOf:
            - type: string
            - type: 'null'
        title:
          oneOf:
            - $ref: '#/components/schemas/ControlThemeTitleSectionInput'
            - type: 'null'
      type: object
    DashboardThemeSectionInput:
      properties:
        backgroundColor:
          oneOf:
            - type: string
            - type: 'null'
        padding:
          oneOf:
            - type: string
            - type: 'null'
      type: object
    WidgetThemeSectionInput:
      properties:
        backgroundColor:
          oneOf:
            - type: string
            - type: 'null'
        border:
          oneOf:
            - $ref: '#/components/schemas/WidgetThemeBorderSectionInput'
            - type: 'null'
        margin:
          oneOf:
            - type: string
            - type: 'null'
        padding:
          oneOf:
            - type: string
            - type: 'null'
        text:
          oneOf:
            - $ref: '#/components/schemas/WidgetThemeTextSectionInput'
            - type: 'null'
        title:
          oneOf:
            - $ref: '#/components/schemas/WidgetThemeTitleSectionInput'
            - type: 'null'
      type: object
    DashboardWidgetPositionInput:
      properties:
        h:
          type: integer
        w:
          type: integer
        x:
          type: integer
        'y':
          type: integer
      required:
        - x
        - 'y'
        - w
        - h
      type: object
    DashboardResponsiveLayoutsInput:
      properties:
        lg:
          oneOf:
            - $ref: '#/components/schemas/DashboardWidgetPositionInput'
            - type: 'null'
        md:
          oneOf:
            - $ref: '#/components/schemas/DashboardWidgetPositionInput'
            - type: 'null'
        sm:
          oneOf:
            - $ref: '#/components/schemas/DashboardWidgetPositionInput'
            - type: 'null'
        xs:
          oneOf:
            - $ref: '#/components/schemas/DashboardWidgetPositionInput'
            - type: 'null'
        xxs:
          oneOf:
            - $ref: '#/components/schemas/DashboardWidgetPositionInput'
            - type: 'null'
      type: object
    DashboardWidgetInputType:
      enum:
        - CHART
        - TEXT
        - FILTER
        - AI
        - TABS_CONTAINER
        - TIME_GRAIN
      type: string
    DashboardBreakpoints:
      properties:
        lg:
          oneOf:
            - type: integer
            - type: 'null'
        md:
          oneOf:
            - type: integer
            - type: 'null'
        sm:
          oneOf:
            - type: integer
            - type: 'null'
        xs:
          oneOf:
            - type: integer
            - type: 'null'
        xxs:
          oneOf:
            - type: integer
            - type: 'null'
      title: DashboardBreakpointsDto
      type: object
    DashboardBreakpointCols:
      properties:
        lg:
          oneOf:
            - type: integer
            - type: 'null'
        md:
          oneOf:
            - type: integer
            - type: 'null'
        sm:
          oneOf:
            - type: integer
            - type: 'null'
        xs:
          oneOf:
            - type: integer
            - type: 'null'
        xxs:
          oneOf:
            - type: integer
            - type: 'null'
      title: DashboardBreakpointColsDto
      type: object
    DashboardWidgetPosition:
      properties:
        h:
          type: integer
        w:
          type: integer
        x:
          type: integer
        'y':
          type: integer
      required:
        - x
        - 'y'
        - w
        - h
      type: object
    DashboardResponsiveLayouts:
      properties:
        lg:
          oneOf:
            - $ref: '#/components/schemas/DashboardWidgetPosition'
            - type: 'null'
        md:
          oneOf:
            - $ref: '#/components/schemas/DashboardWidgetPosition'
            - type: 'null'
        sm:
          oneOf:
            - $ref: '#/components/schemas/DashboardWidgetPosition'
            - type: 'null'
        xs:
          oneOf:
            - $ref: '#/components/schemas/DashboardWidgetPosition'
            - type: 'null'
        xxs:
          oneOf:
            - $ref: '#/components/schemas/DashboardWidgetPosition'
            - type: 'null'
      type: object
    DashboardWidgetDtoType:
      enum:
        - CHART
        - TEXT
        - FILTER
        - AI
        - TABS_CONTAINER
        - TIME_GRAIN
      type: string
    ColumnFormatOverride:
      properties:
        decimalPlaces:
          oneOf:
            - type: integer
            - type: 'null'
        type:
          $ref: '#/components/schemas/ColumnFormatOverrideDtoType'
      required:
        - type
      type: object
    ControlThemeBorderSectionInput:
      properties:
        color:
          oneOf:
            - type: string
            - type: 'null'
        radius:
          oneOf:
            - type: string
            - type: 'null'
        style:
          oneOf:
            - type: string
            - type: 'null'
        width:
          oneOf:
            - type: string
            - type: 'null'
      type: object
    ControlThemeTitleSectionInput:
      properties:
        color:
          oneOf:
            - type: string
            - type: 'null'
        fontFamily:
          oneOf:
            - type: string
            - type: 'null'
        fontSize:
          oneOf:
            - type: string
            - type: 'null'
        fontWeight:
          oneOf:
            - type: string
            - type: 'null'
      type: object
    WidgetThemeBorderSectionInput:
      properties:
        color:
          oneOf:
            - type: string
            - type: 'null'
        radius:
          oneOf:
            - type: string
            - type: 'null'
        style:
          oneOf:
            - type: string
            - type: 'null'
        width:
          oneOf:
            - type: string
            - type: 'null'
      type: object
    WidgetThemeTextSectionInput:
      properties:
        codeFontFamily:
          oneOf:
            - type: string
            - type: 'null'
        color:
          oneOf:
            - type: string
            - type: 'null'
        fontFamily:
          oneOf:
            - type: string
            - type: 'null'
        secondaryColor:
          oneOf:
            - type: string
            - type: 'null'
      type: object
    WidgetThemeTitleSectionInput:
      properties:
        color:
          oneOf:
            - type: string
            - type: 'null'
        fontFamily:
          oneOf:
            - type: string
            - type: 'null'
        fontSize:
          oneOf:
            - type: string
            - type: 'null'
        fontWeight:
          oneOf:
            - type: string
            - type: 'null'
      type: object
    ColumnFormatOverrideDtoType:
      enum:
        - currency
        - percent
        - number
      type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Token authentication. Send `Authorization: Bearer <YOUR_TOKEN>`.'

````