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

# Read a report definition as editable JSON text

Returns the report's definition as canonical JSON text (`content`) and its SHA-256 (`hash`): `name` plus the definition fields of `meta` (`sqlQuery`, `chartCategory`, chart specs, `pivotItems`, …). `vegaSpec` appears as a JSON object. Placements and run state are left out.

Use it with `PATCH /reports/{reportId}/file` to change part of a report without resending it.


## OpenAPI

````yaml /api-reference/api.yaml get /api/v1/deployments/{deploymentId}/reports/{reportId}/file
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: Snowflake Semantic View Sync
  - name: Folders
  - name: Reports
  - name: External Documents
  - name: Workbooks
  - name: Workbook Promotions
  - name: Dashboard Exports
  - name: Notifications
  - name: Scheduled Tasks
  - name: Workspace
  - name: Agents
  - name: Users
  - name: Users Admin
  - name: API Keys
  - 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}/reports/{reportId}/file:
    get:
      tags:
        - Reports
      summary: Read a report definition as editable JSON text
      operationId: getReportFile
      parameters:
        - in: path
          name: deploymentId
          required: true
          schema:
            type: number
        - in: path
          name: reportId
          required: true
          schema:
            type: number
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonConfigFileDto'
          description: ''
components:
  schemas:
    JsonConfigFileDto:
      properties:
        content:
          description: >-
            The configuration as canonical JSON text: keys sorted, 2-space
            indentation, trailing newline. `oldText` in a replacement must match
            this text exactly.
          type: string
        hash:
          description: >-
            SHA-256 of `content`. Send it back as `expectedHash` to reject the
            write if the configuration changed since you read it.
          type: string
      required:
        - content
        - hash
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Token authentication. Send `Authorization: Bearer <YOUR_TOKEN>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.