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

# Read grid data

> Read a grid's columns, rows, one cell, a cell's run detail, or search rows via the `view` enum. A workflow column's workflow_version_id (view=columns) names its pinned VERSION - pass to get_workflow(view=version_detail); cell_run's workflow_run_id instead names the RUN.



## OpenAPI

````yaml https://mcp.agent.writesonic.com/openapi.json post /api/v1/business/grids/data
openapi: 3.1.0
info:
  title: hq-backend — Business API
  description: Public business tool endpoints (API-key auth).
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/business/grids/data:
    post:
      tags:
        - business
      summary: Read grid data
      description: >-
        Read a grid's columns, rows, one cell, a cell's run detail, or search
        rows via the `view` enum. A workflow column's workflow_version_id
        (view=columns) names its pinned VERSION - pass to
        get_workflow(view=version_detail); cell_run's workflow_run_id instead
        names the RUN.
      operationId: get_grid_data_api_v1_business_grids_data_post
      parameters:
        - name: x-project-id
          in: header
          required: true
          schema:
            type: string
            format: uuid
            description: Project ID for tenant scoping
            title: X-Project-Id
          description: Project ID for tenant scoping
        - name: X-Workspace-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            description: Overrides the key's workspace
            title: X-Workspace-Id
          description: Overrides the key's workspace
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: User API key
            title: X-Api-Key
          description: User API key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GridDataArgs'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    GridDataArgs:
      properties:
        view:
          $ref: '#/components/schemas/GridDataView'
          description: >-
            Which grid data slice to return: columns, rows, cell (needs
            row_id/column_id), cell_run (that cell's producing run - needs
            row_id/column_id/workflow_run_id), or row_search. Prefer
            cell/cell_run over rows+page_size=1 for a single-row/cell question -
            but only for expandable (blob-backed) columns, e.g. workflow/output
            columns with markdown/json/array/file content; plain scalar columns
            (text/number/boolean/single_select) already return their full value
            via rows and have no cell view to expand.
        grid_id:
          type: string
          format: uuid
          title: Grid Id
          description: Grid to read from
        row_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Row Id
          description: Row id; required for cell and cell_run views
        column_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Column Id
          description: >-
            Column id; required for cell and cell_run views. For cell_run
            specifically, must be the WORKFLOW-type column id (not the
            input/output column) - the one whose AI runs are being traced.
        workflow_run_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Workflow Run Id
          description: Run id; required for the cell_run view
        query:
          anyOf:
            - type: string
            - type: 'null'
          title: Query
          description: >-
            Search text; required for the row_search view. row_search matches
            only searchable (text-like input) cell values — generated workflow
            output stored as markdown/JSON/blobs is not indexed and won't match.
        page:
          type: integer
          minimum: 1
          title: Page
          default: 1
        page_size:
          type: integer
          maximum: 200
          minimum: 1
          title: Page Size
          default: 50
        column_ids:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Column Ids
          description: >-
            Column id filter for the rows view — return only these columns per
            row instead of every column. See also field_name/column_type for the
            columns view.
        row_ids:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Row Ids
          description: >-
            Row id filter for the rows view — fetch specific, non-contiguous
            rows (e.g. 'rows 3, 7, and 9') instead of a page range. Resolve
            ordinal positions to ids with a prior rows view read, then pass them
            here.
        column_type:
          anyOf:
            - items:
                $ref: '#/components/schemas/GridColumnType'
              type: array
            - type: 'null'
          title: Column Type
          description: >-
            Column-type filter for the columns view. Defaults to INPUT columns;
            pass ['output'] to see the generated/workflow columns the grid
            produces for each row.
        field_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Field Name
          description: >-
            Column filter for the columns view — matches the underlying workflow
            input schema's field name (not the grid's display column name). Use
            this to answer 'which column maps to field X' directly instead of
            listing all columns and matching by eye.
        workflow_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Workflow Id
          description: Filter columns by workflow id (for the columns view)
      type: object
      required:
        - view
        - grid_id
      title: GridDataArgs
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    GridDataView:
      type: string
      enum:
        - columns
        - rows
        - cell
        - cell_run
        - row_search
      title: GridDataView
    GridColumnType:
      type: string
      enum:
        - input
        - workflow
        - output
      title: GridColumnType
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````