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

# List or read grids

> List the grids in a project, look at one grid's setup or its processing status, or see the column types you can add to a grid.

**Example:** "What grids do I have going in this project?"

**Usage:** choose what you want with `view` — the grid inventory (`list`), one grid's full setup (`detail`, needs the grid id), its processing status (`status`, needs the grid id), or the catalog of column types you can add (`column_options`). The inventory comes back in pages of up to 100 (50 by default) and can be narrowed by name, workflow, or who created it, and ranked by newest, most recently updated, or by how many rows sit in a given state (for example to surface the grids with the most failed rows first).

**Response:** for the inventory, a page of grids, each with its name, when it was created, its row and column counts, and how many rows sit in each processing state. Detail adds the grid's columns and its saved sort and filter; status returns the counts plus who is editing it right now. Column options lists each addable type with its name and description.



## OpenAPI

````yaml https://mcp.agent.writesonic.com/openapi.json post /api/v1/business/grids/query
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/query:
    post:
      tags:
        - business
      summary: List or read grids
      description: >-
        List the grids in a project, look at one grid's setup or its processing
        status, or see the column types you can add to a grid.


        **Example:** "What grids do I have going in this project?"


        **Usage:** choose what you want with `view` — the grid inventory
        (`list`), one grid's full setup (`detail`, needs the grid id), its
        processing status (`status`, needs the grid id), or the catalog of
        column types you can add (`column_options`). The inventory comes back in
        pages of up to 100 (50 by default) and can be narrowed by name,
        workflow, or who created it, and ranked by newest, most recently
        updated, or by how many rows sit in a given state (for example to
        surface the grids with the most failed rows first).


        **Response:** for the inventory, a page of grids, each with its name,
        when it was created, its row and column counts, and how many rows sit in
        each processing state. Detail adds the grid's columns and its saved sort
        and filter; status returns the counts plus who is editing it right now.
        Column options lists each addable type with its name and description.
      operationId: list_grids_api_v1_business_grids_query_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/GridListArgs'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    GridListArgs:
      properties:
        view:
          $ref: '#/components/schemas/GridListView'
          description: >-
            Grid listing: 'list' (inventory), 'detail' (config), 'status'
            (processing), or 'column_options' (the live, project-specific
            catalog of addable column types and usable workflow columns — call
            it to get the valid column types rather than guessing them).
        grid_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Grid Id
          description: >-
            Grid id. Required for view='detail' and view='status'. Optional for
            view='list' and view='column_options'
        workflow_ids:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Workflow Ids
          description: Optional workflow filter for the list view
        page:
          type: integer
          minimum: 1
          title: Page
          default: 1
        page_size:
          type: integer
          maximum: 100
          minimum: 1
          title: Page Size
          default: 50
        sort_by:
          $ref: '#/components/schemas/GridSortField'
          description: >-
            Sort the list view by created_at, updated_at, or status_count. Use
            status_count to rank grids by how many rows are in the sort_status
            state — e.g. sort_by=status_count + sort_status=failed +
            sort_order=desc surfaces the grids with the most failed rows first,
            so 'which grids failed' is answered from the top of one page instead
            of scanning every grid.
          default: created_at
        sort_order:
          $ref: '#/components/schemas/SortOrder'
          description: Sort direction for sort_by; asc or desc.
          default: desc
        sort_status:
          $ref: '#/components/schemas/WorkflowRunStatus'
          description: >-
            Row status counted when sort_by=status_count (e.g. failed,
            completed, awaiting_interaction). Pairs with sort_by=status_count to
            rank grids by that status.
          default: awaiting_interaction
        search:
          anyOf:
            - type: string
            - type: 'null'
          title: Search
          description: Free-text filter on grid name for the list view.
        created_by:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Created By
          description: Filter by creator user id(s)
        last_run_after:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Run After
          description: Only grids with a run at/after this time
        last_run_before:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Run Before
          description: Only grids with a run at/before this time
      type: object
      required:
        - view
      title: GridListArgs
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    GridListView:
      type: string
      enum:
        - list
        - detail
        - status
        - column_options
      title: GridListView
    GridSortField:
      type: string
      enum:
        - created_at
        - updated_at
        - status_count
      title: GridSortField
    SortOrder:
      type: string
      enum:
        - asc
        - desc
      title: SortOrder
    WorkflowRunStatus:
      type: string
      enum:
        - pending
        - running
        - completed
        - failed
        - cancelled
        - awaiting_interaction
      title: WorkflowRunStatus
    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

````