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

# Download the Power BI template of a cube.

> Generates the Power BI template (.pbit) file of the given cube. The file holds no data: it carries the connection information and the field metadata Power BI needs to open the cube, with hierarchies mirroring the cube's own hierarchies. The SQL port embedded in the file, the way the exposed columns name the cube levels and the number of decimal places of the measures are read from the atoti.server.sql-bridge.port, atoti.server.sql-bridge.levelNameMode and atoti.server.sql-bridge.pbit.decimal-precision properties of the application, not from this request.



## OpenAPI

````yaml post /activeviam/bi-adapter/rest/v1/powerbi/pbit/{cubeName}
openapi: 3.1.0
info:
  title: Atoti REST services
  version: 6.2.1-SNAPSHOT
servers:
  - description: The Atoti Server instance to query
    url: '{scheme}://{host}'
    variables:
      host:
        default: my-atoti-server:9090
        description: Host and port of your Atoti Server instance
      scheme:
        default: https
        enum:
          - http
          - https
security: []
tags:
  - description: Implementation of the REST API controller for an ActivePivot database.
    name: Database REST API
  - description: >
      GetAggregatesQuery (GAQ) REST API for executing OLAP queries.


      This API provides a programmatic way to execute GetAggregatesQuery
      operations

      against Atoti cubes. Results are returned in Apache Arrow format for
      efficient

      data transfer and processing.


      **Note:** This API is experimental and may change in future versions
      without notice.
    name: GAQ Query REST API
  - description: >
      XML for Analysis (XMLA) endpoint for executing MDX queries and OLAP
      discovery operations.


      This endpoint implements the XMLA protocol which is used by:

      - Microsoft Excel and other OLAP clients

      - Custom BI tools that support XMLA connectivity


      The endpoint supports both text XML and binary XML formats for improved
      performance.
    name: XMLA API
  - description: Definition of REST API to query data from ActivePivot (V10).
    name: Query REST API (V10)
  - description: Definition of REST API to query data from ActivePivot (V9).
    name: Query REST API (V9)
  - description: Implementation of the REST Bulk API of the content server (version 8).
    name: Bulk REST API
  - description: Implementation of the REST API of the content server.
    name: Content Server REST API
  - description: Implementation of the REST API controller for an ActivePivot database.
    name: Database REST API v9
  - description: ' Definition of the REST service returning the list of services exposed by an application.'
    name: Version REST API
  - description: Rest Service providing the discovery information.
    name: Discovery REST API
  - description: >-
      Endpoints for Atoti Auto-Explain, which explains how a measure varies
      between two members by attributing the variation to the hierarchies that
      drive it.
    name: Auto-Explain
  - description: JSON Web Token (JWT) endpoint.
    name: JWT API
  - description: >
      Endpoints to retrieve and manage query history.


      **Note:** This API is experimental and may change in future versions
      without notice.
    name: Query History REST API (Experimental)
  - description: Description of REST API to configure an ActivePivot application.
    name: Configuration REST API
  - description: API to export the result of MDX queries
    name: Data Export
  - description: >
      GetAggregatesQuery (GAQ) REST API for executing OLAP queries.


      This API provides a programmatic way to execute GetAggregatesQuery
      operations

      against Atoti cubes. Results and updates are streamed in Apache Arrow
      format for efficient

      data transfer and processing.
    name: Continuous GAQ Query REST API
  - description: Endpoints of the Atoti BI adapter.
    name: BI Adapter REST API
  - description: Endpoints for AI-based optimization of Atoti cubes
    name: AI Optimizer
  - description: Implementation of the REST Bulk API of the content server.
    name: Bulk REST API
paths:
  /activeviam/bi-adapter/rest/v1/powerbi/pbit/{cubeName}:
    post:
      tags:
        - BI Adapter REST API
      summary: Download the Power BI template of a cube.
      description: >-
        Generates the Power BI template (.pbit) file of the given cube. The file
        holds no data: it carries the connection information and the field
        metadata Power BI needs to open the cube, with hierarchies mirroring the
        cube's own hierarchies. The SQL port embedded in the file, the way the
        exposed columns name the cube levels and the number of decimal places of
        the measures are read from the atoti.server.sql-bridge.port,
        atoti.server.sql-bridge.levelNameMode and
        atoti.server.sql-bridge.pbit.decimal-precision properties of the
        application, not from this request.
      operationId: buildPbit
      parameters:
        - description: Id of the cube to export.
          in: path
          name: cubeName
          required: true
          schema:
            default: ''
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PbitOptions'
        required: true
      responses:
        '200':
          content:
            application/octet-stream:
              schema:
                additionalProperties:
                  default: ''
                default: ''
                format: binary
                type: string
          description: >-
            The generated .pbit file, as an attachment named after the exported
            cube.
        '404':
          content:
            application/octet-stream:
              schema:
                $ref: '#/components/schemas/StreamingResponseBody'
          description: No cube exists with the requested id.
components:
  schemas:
    PbitOptions:
      default: null
      description: Options used to generate the Power BI template.
      properties:
        host:
          default: ''
          description: >-
            Hostname or IP address Power BI uses to reach the SQL endpoint of
            Atoti Server. It is embedded in the generated file, so it must be
            reachable from wherever Power BI runs.
          type: string
      required:
        - host
      type: object
    StreamingResponseBody: {}

````