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

# Retrieve the table definition of a report run whose data is not held in Druid.

> Returns the tabs of an accessible report run, each carrying its column and pivot
metadata and the depth its pivots open to, for a run stored outside Druid. It returns
no row values. An unavailable or restricted run returns an unsuccessful response
envelope. Report restriction and caller fields are server-managed, and the definition
describes only what the caller is authorized to see.



## OpenAPI

````yaml /risk-and-pricing/atoti-risk-services/apis-endpoints/openapi/openapi.mintlify.json post /api/ReportQuery/LegacyTableDefinition
openapi: 3.0.4
info:
  title: Derivitec Api 1.0
  version: '1.0'
servers:
  - url: https://api.riskportal.activeviam.com
security:
  - oauth2: []
  - apikey: []
tags:
  - name: AdminUser
  - name: AtotiReport
  - name: AtotiSession
  - name: BloombergOAuth
  - name: Bond
  - name: BondYieldCurvePage
  - name: BookAccess
  - name: Books
  - name: Commodity
  - name: Counterparties
  - name: Currencies
  - name: Equity
  - name: EquityDividend
  - name: EquityPage
  - name: FeatureFlag
  - name: Fx
  - name: FxPage
  - name: GroupAccess
  - name: Home
  - name: LegacyPosition
  - name: MarketData
  - name: MarketDataProvider
  - name: MarketDataProviderAccess
  - name: Meta
  - name: Notification
  - name: Organisation
  - name: PnLReport
  - name: PortfolioAccess
  - name: Portfolios
  - name: Position
  - name: PositionFilter
  - name: PricingEnvironment
  - name: PricingEnvironmentAccess
  - name: RateAsset
  - name: RateAssetPage
  - name: Report
  - name: ReportDefinition
  - name: ReportHistoryLauncherQuery
  - name: ReportLauncher
  - name: ReportQuery
  - name: ReportQueryViewUser
  - name: ReportRestriction
  - name: ReportView
  - name: RiskReport
  - name: Tradable
  - name: TradeBooking
  - name: User
  - name: VarReport
  - name: VarReportQuery
  - name: YieldCurvePage
paths:
  /api/ReportQuery/LegacyTableDefinition:
    post:
      tags:
        - ReportQuery
      summary: >-
        Retrieve the table definition of a report run whose data is not held in
        Druid.
      description: >-
        Returns the tabs of an accessible report run, each carrying its column
        and pivot

        metadata and the depth its pivots open to, for a run stored outside
        Druid. It returns

        no row values. An unavailable or restricted run returns an unsuccessful
        response

        envelope. Report restriction and caller fields are server-managed, and
        the definition

        describes only what the caller is authorized to see.
      operationId: LegacyTableDefinition
      requestBody:
        description: >-
          The body containing the required opaque report-run `ReportId` and an
          optional `TableViewDefinitionId` selecting a saved table view. Report
          restriction and caller fields are server-managed. Which columns are
          filterable or sortable, and the units of their values, are described
          by the response rather than assumed by the caller.
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/ApiGetLegacyTableDefinitionRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/ApiGetLegacyTableDefinitionRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/ApiGetLegacyTableDefinitionRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/ApiGetLegacyTableDefinitionRequest'
      responses:
        '200':
          description: >-
            Returns the report's tabs with their column and pivot metadata, or
            an unsuccessful envelope when the run is unavailable, restricted, or
            not stored outside Druid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiGetLegacyTableDefinitionResponse'
        '400':
          description: BadRequest
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - oauth2: []
        - apikey: []
components:
  schemas:
    ApiGetLegacyTableDefinitionRequest:
      required:
        - $type
      type: object
      properties:
        report_id:
          type: string
          description: >-
            Opaque identifier of the report run to retrieve or query. The value
            must not be null or empty.
          nullable: true
        portfolio_type:
          enum:
            - derivitec
            - enfusion
            - orchestrade
            - liquidity_book
            - maia
            - fund_studio
            - not_set
          type: string
          description: >-
            Portfolio category used to resolve the requested portfolio. It may
            be omitted when the portfolio name resolves unambiguously.
          nullable: true
        table_view_definition_id:
          type: string
          description: Named table view to apply. Null selects the user's default.
          nullable: true
        report_type:
          enum:
            - risk
            - var
            - pnl
            - time_series
          type: string
          description: >-
            The report category that selects the applicable metadata shape.
            Server-managed.
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.LegacyReportQuery.ApiGetLegacyTableDefinitionRequest,
              Derivitec.Web.Core
      additionalProperties: false
      description: >-
        Asks for the authorized table definition of a report run whose data is
        not held in Druid.

        The server derives the available table views; the caller never supplies
        column definitions.
    ApiGetLegacyTableDefinitionResponse:
      required:
        - $type
      type: object
      properties:
        is_success:
          type: boolean
          description: >-
            Whether the operation completed successfully. The default is `true`;
            error outcomes set it to `false`.
          example: true
        error_messages:
          type: array
          items:
            type: string
          description: >-
            Messages explaining operation-level failures. The collection is
            empty by default.
          nullable: true
        report_id:
          type: string
          description: Report id.
          nullable: true
        report_name:
          type: string
          description: Report name.
          nullable: true
        reporting_currency:
          type: string
          description: |-
            Reporting currency, which the client needs for the FX cross
            self-link exclusion.
          nullable: true
        tabs:
          type: array
          items:
            $ref: '#/components/schemas/LegacyTableTabWire'
          description: Ordered table tabs.
          nullable: true
        active_tab_index:
          type: integer
          description: Index of the tab that starts active.
          format: int32
        available_table_views:
          type: array
          items:
            $ref: '#/components/schemas/LegacyTableViewOption'
          description: Named table views the user may select.
          nullable: true
        selected_table_view_id:
          type: string
          description: Currently selected named table view.
          nullable: true
        can_export_raw:
          type: boolean
          description: Whether the raw dump export is allowed.
        can_export_current_view:
          type: boolean
          description: Whether the current-view export is allowed.
        export_prohibited_reason:
          type: string
          description: Why export is prohibited, when it is.
          nullable: true
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.LegacyReportQuery.ApiGetLegacyTableDefinitionResponse,
              Derivitec.Web.Core
      additionalProperties: false
      description: The authorized table definition of a non-Druid Risk report.
    LegacyTableTabWire:
      required:
        - $type
      type: object
      properties:
        table_id:
          type: string
          description: Table view's stable id.
          nullable: true
        title:
          type: string
          description: Tab title.
          nullable: true
        columns:
          type: array
          items:
            $ref: '#/components/schemas/LegacyTableColumnWire'
          description: Ordered report columns.
          nullable: true
        pivots:
          type: array
          items:
            $ref: '#/components/schemas/LegacyTablePivotWire'
          description: Ordered pivots.
          nullable: true
        initial_expansion_depth:
          type: integer
          description: Depth the table starts expanded to.
          format: int32
        max_expansion_depth:
          type: integer
          description: Deepest expandable level.
          format: int32
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.LegacyReportQuery.LegacyTableTabWire,
              Derivitec.Web.Core
      additionalProperties: false
      description: One table tab.
    LegacyTableViewOption:
      required:
        - $type
      type: object
      properties:
        id:
          type: string
          description: Table view definition id.
          nullable: true
        display_name:
          type: string
          description: Display name.
          nullable: true
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.LegacyReportQuery.LegacyTableViewOption,
              Derivitec.Web.Core
      additionalProperties: false
      description: One named table view the user may select.
    LegacyTableColumnWire:
      required:
        - $type
      type: object
      properties:
        key:
          type: string
          description: Stable key used in row values, filters and sorts.
          nullable: true
        display_name:
          type: string
          description: Header text.
          nullable: true
        tool_tip:
          type: string
          description: Header tooltip. Plain text, never HTML.
          nullable: true
        data_type:
          enum:
            - string
            - integer
            - decimal
            - boolean
            - date
            - date_time
          type: string
          description: Semantic data type.
        renderer_role:
          enum:
            - plain_text
            - number
            - date_time
            - boolean
          type: string
          description: Renderer role.
        width:
          type: integer
          description: Initial column width in pixels.
          format: int32
        visible:
          type: boolean
          description: Whether the column starts visible.
        filterable:
          type: boolean
          description: Whether the column can be filtered.
        chartable:
          type: boolean
          description: Whether the column can be charted.
        supported_operators:
          type: array
          items:
            enum:
              - is_equal_to
              - is_not_equal_to
              - starts_with
              - ends_with
              - contains
              - is_greater_than
              - is_greater_than_or_equal_to
              - is_less_than
              - is_less_than_or_equal_to
            type: string
            description: The filter operators the legacy report table accepts.
          description: Operators this column accepts. Empty when not filterable.
          nullable: true
        multiplier:
          type: number
          description: Multiplier the client must apply before display.
          format: double
          nullable: true
        decimals:
          type: integer
          description: Decimal precision for a numeric column.
          format: int32
          nullable: true
        format:
          type: string
          description: Semantic number or date format string.
          nullable: true
        is_error_flag:
          type: boolean
          description: Whether this is the row error count.
        is_error_message:
          type: boolean
          description: Whether this is the row error message.
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.LegacyReportQuery.LegacyTableColumnWire,
              Derivitec.Web.Core
      additionalProperties: false
      description: One report column, described semantically.
    LegacyTablePivotWire:
      required:
        - $type
      type: object
      properties:
        key:
          type: string
          description: Pivot key used in row requests.
          nullable: true
        display_name:
          type: string
          description: Pivot's display name.
          nullable: true
        active:
          type: boolean
          description: Whether the pivot starts active.
        link_kind:
          enum:
            - none
            - tradable
            - equity
            - book
            - portfolio
            - rate_curve
            - fx
          type: string
          description: Drill-through target for this pivot's values.
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.LegacyReportQuery.LegacyTablePivotWire,
              Derivitec.Web.Core
      additionalProperties: false
      description: One pivot available on a table.
  securitySchemes:
    oauth2:
      type: oauth2
      description: >-
        OAuth2 access-token requested from AWS Cognito and provided as a Auth
        Bearer header
      flows:
        implicit:
          authorizationUrl: https://auth.riskportal.derivitec.com/oauth2/authorize
          scopes: {}
    apikey:
      type: apiKey
      description: API-Key requested via the site and provided as a header
      name: x-api-key
      in: header

````