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

# Filter live entities across a project

> Evaluate typed field conditions and AND/OR groups with a bounded flat scan. Returns IDs, without hierarchy, sorting, or a total count. Each page reads current state; concurrent edits can change later results. Continue until next_cursor is null, including after an empty page. Relationship, subtree, comment, and history filters are not supported.



## OpenAPI

````yaml /openapi/customer-api.json post /project/{projectId}/entities/filter/query
openapi: 3.0.0
info:
  contact: {}
  description: >-
    Flow customer API reference. Start with the [quickstart](/api/quickstart)
    and [authentication guide](/api/authentication).
  title: Customer API
  version: 1.0.0
servers:
  - description: Flow API
    url: '{baseUrl}'
    variables:
      baseUrl:
        default: https://backend.branch.flowengineering.com
security: []
tags:
  - name: Automations
  - name: Branches
  - name: Comments
  - name: Convert
  - name: Data Model
  - name: Diagrams
  - name: Entities
  - name: Files
  - name: Import
  - name: Notifications
  - name: Projects
  - name: ReqIF
  - name: ReqIF Import
  - name: Shared Access Grants
  - name: User Groups
  - name: Users
paths:
  /project/{projectId}/entities/filter/query:
    post:
      tags:
        - Entities
      summary: Filter live entities across a project
      description: >-
        Evaluate typed field conditions and AND/OR groups with a bounded flat
        scan. Returns IDs, without hierarchy, sorting, or a total count. Each
        page reads current state; concurrent edits can change later results.
        Continue until next_cursor is null, including after an empty page.
        Relationship, subtree, comment, and history filters are not supported.
      operationId: CustomerEntityFilterController_query
      parameters:
        - in: path
          name: projectId
          required: true
          schema:
            type: string
        - description: Workspace identifier
          in: header
          name: customer
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerEntityFilterQueryDto'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerEntityFilterPageDto'
          description: ''
        '400':
          description: >-
            Invalid filter, incompatible field operation, or cursor for a
            different query/data model.
        '503':
          description: >-
            The materialized read model is not ready. No scan result was
            produced; retry later.
      security:
        - api-key: []
        - bearer: []
components:
  schemas:
    CustomerEntityFilterQueryDto:
      properties:
        branch_id:
          description: Branch to read; omit or use master for Base.
          minLength: 1
          type: string
        cursor:
          description: >-
            Opaque next_cursor from the same query. These are live pages, not a
            frozen snapshot; restart if the filter or data model changes.
          type: string
        filter:
          description: >-
            At most 50 total nodes and 5 group levels. Unknown properties,
            categories, fields, options, or invalid operands receive 400; no
            condition is silently dropped.
          discriminator:
            mapping:
              field: '#/components/schemas/CustomerEntityFieldFilterDto'
              group: '#/components/schemas/CustomerEntityFilterGroupDto'
              type: '#/components/schemas/CustomerEntityTypeFilterDto'
            propertyName: kind
          oneOf:
            - $ref: '#/components/schemas/CustomerEntityTypeFilterDto'
            - $ref: '#/components/schemas/CustomerEntityFieldFilterDto'
            - $ref: '#/components/schemas/CustomerEntityFilterGroupDto'
        limit:
          default: 50
          maximum: 100
          minimum: 1
          type: number
        timezone:
          default: UTC
          description: >-
            IANA timezone for calendar-date boundaries. Date-only stored values
            retain their calendar dates.
          type: string
      required:
        - filter
      type: object
    CustomerEntityFilterPageDto:
      properties:
        entity_ids:
          description: >-
            Matching live entity IDs. Fetch entity records using the batch
            entity read endpoint.
          items:
            type: string
          type: array
        next_cursor:
          description: >-
            Continue until null, even when entity_ids is empty. Each request
            examines at most the server scan budget before returning progress.
          nullable: true
          type: string
      required:
        - entity_ids
        - next_cursor
      type: object
    CustomerEntityFieldFilterDto:
      properties:
        category_id:
          description: >-
            Category ID. This condition only matches entities of this category,
            including empty-field conditions.
          type: string
        field_key:
          description: >-
            Stored field key from the data model, or a built-in key such as
            name, description, owner, or reviewers.
          type: string
        kind:
          enum:
            - field
          type: string
        operation:
          description: >-
            Must be valid for the field type. Text uses case-insensitive
            comparisons; tag/stage values are exact option names; user values
            are IDs. Boolean fields accept isTrue/isFalse. Presence conditions
            have no operands.
          enum:
            - equals
            - notEquals
            - contains
            - notContains
            - startsWith
            - endsWith
            - greaterThan
            - greaterThanOrEqual
            - lessThan
            - lessThanOrEqual
            - between
            - 'on'
            - before
            - after
            - overlaps
            - excludes
            - isTrue
            - isFalse
            - isEmpty
            - isPopulated
          type: string
        value:
          description: >-
            Text, finite number, or ISO calendar date (YYYY-MM-DD). Required for
            scalar comparisons.
          oneOf:
            - maxLength: 2000
              type: string
            - type: number
        value_to:
          description: Inclusive upper bound. Required only for between.
          oneOf:
            - type: string
            - type: number
        values:
          description: >-
            Required for overlaps/excludes on tags, stages, verification
            results, or users.
          items:
            type: string
          maxItems: 100
          minItems: 1
          type: array
      required:
        - kind
        - category_id
        - field_key
        - operation
      type: object
    CustomerEntityFilterGroupDto:
      properties:
        conditions:
          items:
            oneOf:
              - $ref: '#/components/schemas/CustomerEntityTypeFilterDto'
              - $ref: '#/components/schemas/CustomerEntityFieldFilterDto'
              - $ref: '#/components/schemas/CustomerEntityFilterGroupDto'
          maxItems: 50
          minItems: 1
          type: array
        kind:
          enum:
            - group
          type: string
        operator:
          enum:
            - and
            - or
          type: string
      required:
        - kind
        - operator
        - conditions
      type: object
    CustomerEntityTypeFilterDto:
      properties:
        kind:
          enum:
            - type
          type: string
        operation:
          enum:
            - overlaps
            - excludes
          type: string
        values:
          description: Category IDs from the project data model.
          items:
            type: string
          maxItems: 100
          minItems: 1
          type: array
      required:
        - kind
        - operation
        - values
      type: object
  securitySchemes:
    api-key:
      in: header
      name: X-API-Key
      type: apiKey
    bearer:
      bearerFormat: JWT
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.