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



## OpenAPI

````yaml /api-reference/api.yaml post /v1/deployments/{deploymentId}/reports
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}/reports:
    post:
      tags:
        - Reports
      summary: Create report
      operationId: createReport
      parameters:
        - in: path
          name: deploymentId
          required: true
          schema:
            type: number
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateReportInput'
        description: CreateReportInput
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Report'
          description: ''
components:
  schemas:
    CreateReportInput:
      properties:
        endResultCell:
          oneOf:
            - type: string
            - type: 'null'
        externalWorkbookId:
          oneOf:
            - type: string
            - type: 'null'
        folderId:
          oneOf:
            - type: integer
            - type: 'null'
        jsonQuery:
          oneOf:
            - type: string
            - type: 'null'
        meta:
          oneOf:
            - type: object
              additionalProperties: true
            - type: 'null'
        name:
          oneOf:
            - type: string
            - type: 'null'
        pivotItems:
          oneOf:
            - $ref: '#/components/schemas/PivotItemsInput'
            - type: 'null'
        publicId:
          oneOf:
            - pattern: ^[0-9A-Za-z]+$
              type: string
              minLength: 12
              maxLength: 12
            - type: 'null'
        resultLocation:
          oneOf:
            - type: string
            - type: 'null'
        source:
          oneOf:
            - $ref: '#/components/schemas/CreateReportInputSource'
            - type: 'null'
        sqlQuery:
          oneOf:
            - type: string
            - type: 'null'
        title:
          oneOf:
            - type: string
            - type: 'null'
        workbookId:
          oneOf:
            - type: integer
            - type: 'null'
      type: object
    Report:
      properties:
        createdAt:
          oneOf:
            - format: date
              type: string
            - format: date-time
              type: string
        createdBy:
          type: integer
        deploymentId:
          type: integer
        description:
          oneOf:
            - type: string
            - type: 'null'
        endResultCell:
          oneOf:
            - type: string
            - type: 'null'
        externalWorkbookId:
          oneOf:
            - type: string
            - type: 'null'
        folderId:
          oneOf:
            - type: integer
            - type: 'null'
        id:
          type: integer
        jsonQuery:
          oneOf:
            - type: string
            - type: 'null'
        meta:
          oneOf:
            - type: object
              additionalProperties: true
            - type: 'null'
        name:
          type: string
        pivotItems:
          oneOf:
            - $ref: '#/components/schemas/PivotItems'
            - type: 'null'
        publicId:
          pattern: ^[0-9A-Za-z]+$
          type: string
          minLength: 12
          maxLength: 12
        refreshedBy:
          oneOf:
            - type: integer
            - type: 'null'
        refreshedByUser:
          $ref: '#/components/schemas/ResourceOwner'
        resultLocation:
          oneOf:
            - type: string
            - type: 'null'
        rolesWithAccess:
          oneOf:
            - items:
                $ref: '#/components/schemas/RoleWithAccess'
              type: array
            - type: 'null'
        source:
          oneOf:
            - $ref: '#/components/schemas/ReportDtoSource'
            - type: 'null'
        sqlQuery:
          oneOf:
            - type: string
            - type: 'null'
        title:
          oneOf:
            - type: string
            - type: 'null'
        type:
          $ref: '#/components/schemas/ReportDtoType'
        updatedAt:
          oneOf:
            - format: date
              type: string
            - format: date-time
              type: string
        user:
          $ref: '#/components/schemas/ResourceOwner'
        userId:
          type: integer
        version:
          oneOf:
            - type: integer
            - type: 'null'
        workbookId:
          oneOf:
            - type: integer
            - type: 'null'
      required:
        - publicId
        - userId
        - user
        - name
        - refreshedByUser
        - id
        - deploymentId
        - createdAt
        - updatedAt
        - type
      type: object
    PivotItemsInput:
      properties:
        columns:
          items:
            type: string
          type: array
        filters:
          items:
            type: string
          type: array
        measures:
          items:
            type: string
          type: array
        rows:
          items:
            type: string
          type: array
      required:
        - columns
        - measures
        - rows
        - filters
      type: object
    CreateReportInputSource:
      enum:
        - GOOGLE_SHEETS
        - EXCEL
        - PLAYGROUND
        - D3
      type: string
    PivotItems:
      properties:
        columns:
          items:
            type: string
          type: array
        filters:
          items:
            type: string
          type: array
        measures:
          items:
            type: string
          type: array
        rows:
          items:
            type: string
          type: array
      required:
        - columns
        - measures
        - rows
        - filters
      type: object
    ResourceOwner:
      properties:
        email:
          type: string
        firstName:
          oneOf:
            - type: string
            - type: 'null'
        id:
          type: integer
        picture:
          oneOf:
            - type: string
            - type: 'null'
      required:
        - id
        - email
      type: object
    RoleWithAccess:
      properties:
        actions:
          items:
            enum:
              - All
              - DeploymentsManage
              - DeploymentCreate
              - DeploymentRead
              - DeploymentUpdate
              - DeploymentDelete
              - PlaygroundRead
              - SchemaRead
              - SchemaUpdate
              - SchemaUpdateDevBranches
              - APMRead
              - PreAggregationBuild
              - AlertsCreate
              - AlertsRead
              - AlertsUpdate
              - AlertsDelete
              - AuditLogManage
              - BillingRead
              - SqlRunnerRead
              - DataAssetsRead
              - DataAssetsManage
              - CubeNetworkConnect
              - ReportRead
              - ReportEdit
              - ReportManage
              - WorkbookManage
              - WorkbookRead
              - WorkbookEdit
              - ChatThreadRead
              - AgentManage
              - AgentRead
              - AgentSpaceManage
              - AgentAdmin
              - DeploymentAgentRead
              - OAuthIntegrationsManage
              - OAuthIntegrationsIssueTokens
              - McpToolsManage
              - AIBIDevelop
              - AIBIExplore
              - AIBIView
              - ChartPalettesManage
              - DashboardThemesManage
              - AIBIDeveloper
              - AIBIUser
              - AIBIViewer
              - EmbedDeploymentRead
              - EmbedDashboardRead
              - FolderRead
              - FolderEdit
              - FolderManage
            type: string
          type: array
        id:
          type: integer
        name:
          type: string
      required:
        - id
        - name
        - actions
      type: object
    ReportDtoSource:
      enum:
        - GOOGLE_SHEETS
        - EXCEL
        - PLAYGROUND
        - D3
      type: string
    ReportDtoType:
      enum:
        - FOLDER
        - WORKBOOK
        - REPORT
      type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Token authentication. Send `Authorization: Bearer <YOUR_TOKEN>`.'

````