> ## 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 one grouping level of a report table whose data is not held in Druid.

> Returns one page of one grouping level, which is what a server-side row model requests:
the children of the group named by `GroupKeys`, or the top level when it is empty,
and the report's own rows once it names every active pivot. Each request is answered
independently, so no expansion state is retained between calls. An unavailable or
restricted run, or a request the engine cannot satisfy, returns an unsuccessful
response envelope carrying a failure category. Report restriction and caller fields are
server-managed, and rows the caller is not authorized to see are never returned.



## OpenAPI

````yaml /risk-and-pricing/atoti-risk-services/apis-endpoints/openapi/openapi.mintlify.json post /api/ReportQuery/LegacyTableRows
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/LegacyTableRows:
    post:
      tags:
        - ReportQuery
      summary: >-
        Retrieve one grouping level of a report table whose data is not held in
        Druid.
      description: >-
        Returns one page of one grouping level, which is what a server-side row
        model requests:

        the children of the group named by `GroupKeys`, or the top level when it
        is empty,

        and the report's own rows once it names every active pivot. Each request
        is answered

        independently, so no expansion state is retained between calls. An
        unavailable or

        restricted run, or a request the engine cannot satisfy, returns an
        unsuccessful

        response envelope carrying a failure category. Report restriction and
        caller fields are

        server-managed, and rows the caller is not authorized to see are never
        returned.
      operationId: LegacyTableRows
      requestBody:
        description: >-
          The body containing the required opaque report-run `ReportId`, the
          `TableId` and optional `TableViewDefinitionId` identifying the table,
          the `StartRow` and `EndRow` paging bounds, optional `Filters` and
          `Sorts`, the `ActivePivotKeys` giving the pivot hierarchy in order,
          the `GroupKeys` naming the group whose level is wanted, and a
          client-generated `RequestSequence` echoed back for correlation. Report
          restriction and caller fields are server-managed. A pivot key the
          report does not declare, and a filter operator a column does not
          support, are rejected rather than ignored.
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/ApiGetLegacyTableRowsRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/ApiGetLegacyTableRowsRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/ApiGetLegacyTableRowsRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/ApiGetLegacyTableRowsRequest'
      responses:
        '200':
          description: >-
            Returns the level's rows and its `LastRow` total, or an unsuccessful
            envelope with a failure category when the run is unavailable,
            restricted, or the request does not resolve.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiGetLegacyTableRowsResponse'
        '400':
          description: BadRequest
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - oauth2: []
        - apikey: []
components:
  schemas:
    ApiGetLegacyTableRowsRequest:
      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_id:
          type: string
          description: Table view's stable id, from the definition response.
          nullable: true
        table_view_definition_id:
          type: string
          description: Named table view to apply. Null selects the user's default.
          nullable: true
        start_row:
          type: integer
          description: Inclusive first visible row index.
          format: int32
        end_row:
          type: integer
          description: Exclusive last visible row index.
          format: int32
        filters:
          type: array
          items:
            $ref: '#/components/schemas/LegacyTableFilterWire'
          description: Filter conditions.
          nullable: true
        sorts:
          type: array
          items:
            $ref: '#/components/schemas/LegacyTableSortWire'
          description: Ordered sort instructions.
          nullable: true
        active_pivot_keys:
          type: array
          items:
            type: string
          description: >-
            Pivot keys to group by, in order. This is AG Grid's

            `rowGroupCols`, so reordering the row-group panel reorders the
            pivots.
          nullable: true
        group_keys:
          type: array
          items:
            type: string
          description: >-
            Pivot value path of the group whose children are wanted, i.e. AG

            Grid's `groupKeys`. Empty means the top level. The grid owns the
            expansion state

            and asks for one level per request.
          nullable: true
        request_sequence:
          type: integer
          description: >-
            Opaque client sequence number, echoed back untouched so the client
            can

            discard a late response. The server never interprets it.
          format: int64
        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.ApiGetLegacyTableRowsRequest,
              Derivitec.Web.Core
      additionalProperties: false
      description: >-
        Asks for one page of one grouping level of a non-Druid Risk report
        table. Every field the

        result depends on is present, so the request is reproducible without
        server-side session

        state.
                    
        The shape mirrors the Druid path's `row_group_cols` / `group_keys`,
        because both

        are driven by AG Grid's server-side row grouping.
    ApiGetLegacyTableRowsResponse:
      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
        data:
          type: array
          items:
            $ref: '#/components/schemas/LegacyTableRowWire'
          description: Requested slice of this level's rows.
          nullable: true
        last_row:
          type: integer
          description: |-
            Number of rows at this grouping level - not the number of raw report
            rows, and not the page size.
          format: int32
        request_sequence:
          type: integer
          description: Client sequence number from the request, echoed back.
          format: int64
        failure_category:
          enum:
            - unknown_column
            - unsupported_operator
            - invalid_filter_value
            - unknown_pivot
            - invalid_pivot_path
            - invalid_row_range
            - unknown_table
            - unknown_table_view
            - column_not_filterable
          type: string
          description: Failure category when the request was rejected.
          nullable: true
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.LegacyReportQuery.ApiGetLegacyTableRowsResponse,
              Derivitec.Web.Core
      additionalProperties: false
      description: >-
        One page of one grouping level of a non-Druid Risk report table. Carries
        no Druid segment

        or ingestion fields.
    LegacyTableFilterWire:
      required:
        - $type
      type: object
      properties:
        column_key:
          type: string
          description: >-
            The key of the column to filter, as given by the table definition. A
            column the

            definition does not mark filterable is rejected rather than ignored.
          nullable: true
        operator:
          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 comparison to apply. An operator the column does not list as
            supported is

            rejected rather than ignored.
        value:
          type: string
          description: >-
            The value to compare against, formatted culture-invariantly: a
            round-trip ISO

            timestamp for a date column, and a plain decimal point for a numeric
            one.
          nullable: true
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.LegacyReportQuery.LegacyTableFilterWire,
              Derivitec.Web.Core
      additionalProperties: false
      description: >-
        One filter condition on one column. The legacy grid allowed a single
        condition per column,

        and conditions across columns combine with AND.
    LegacyTableSortWire:
      required:
        - $type
      type: object
      properties:
        column_key:
          type: string
          description: >-
            The key of the column to sort by, as given by the table definition.
            A column the

            definition does not know is rejected rather than ignored.
          nullable: true
        descending:
          type: boolean
          description: >-
            Whether to sort descending rather than ascending. Sorting is by
            signed value; sorting

            by absolute value is not offered for this table.
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.LegacyReportQuery.LegacyTableSortWire,
              Derivitec.Web.Core
      additionalProperties: false
      description: One sort instruction on one column.
    LegacyTableRowWire:
      required:
        - $type
      type: object
      properties:
        pivot_key:
          type: string
          description: The pivot column this row is grouped by.
          nullable: true
        pivot_value:
          type: string
          description: The raw pivot value, used for drill-through.
          nullable: true
        pivot_value_displayed:
          type: string
          description: >-
            The pivot value as displayed, which is what identifies this group in
            a later request.
          nullable: true
        depth:
          type: integer
          description: The zero-based depth of this row in the pivot tree.
          format: int32
        expandable:
          type: boolean
          description: Whether this row can be expanded.
        expanded:
          type: boolean
          description: Whether this row is expanded.
        values:
          type: object
          additionalProperties: {}
          description: >-
            Raw, unscaled aggregated values keyed by column key, plus this row's

            own pivot value under its pivot key - AG Grid reads a group's key
            from the row's field

            value for the active row-group column. The multiplier and decimal
            precision travel as

            column metadata and are applied by the client.
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.LegacyReportQuery.LegacyTableRowWire,
              Derivitec.Web.Core
      additionalProperties: false
      description: >-
        One row at one grouping level.
                    
        There is no path field: AG Grid owns the group path and sends it back as
        the next request's

        group keys.
  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

````