---
title: "Returns the current user's search views of an entity type in a project"
method: GET
path: "/searchView/project/{project_id}"
tags: ["searchView"]
---

# Returns the current user's search views of an entity type in a project

`GET /searchView/project/{project_id}`

## Path parameters

- `project_id` integer, required

## Query parameters

- `entity_type` 'memo' | 'span_annotation' | 'sentence_annotation' | 'bbox_annotation', required — The searchable entity a saved view is for. Each value maps to one column enum (`MemoColumns`, `SpanColumns`, ...). The value is stored in `SearchViewORM.entity_type` and used as the discriminator for the create/read/update unions below. Sdoc is deliberately omitted: it is ElasticSearch-backed and not part of the unified search flow yet.

## Response `200`

Successful Response

- union[]
  - union
    - MemoSearchViewRead
      - `entity_type` 'memo'
      - `project_id` integer, required
      - `name` string, required
      - `layout` 'table' | 'list' | 'board' | 'gallery' | 'feed', required
      - `filters` FilterMemoColumnsOutput, required
        - `id` string, required — Unique id of this node within the filter tree
        - `items` union[], required — Child expressions and/or nested filter nodes
          - union
            - FilterExpressionMemoColumns
              - …
            - FilterMemoColumnsOutput — recursive
        - `logic_operator` 'or' | 'and', required — This tells our filter how to combine multiple column expressions.
      - `group_by` GroupConfigMemoColumns
        - `field` 'M_TITLE' | 'M_CONTENT' | 'M_USER_ID' | 'M_ATTACHED_OBJECT_TYPE' | 'M_ATTACHED_OBJECT_ID' | 'M_CREATED' | 'M_UPDATED' | 'M_FAVORITE', required
        - `date_granularity` 'day' | 'week' | 'month' | 'year' — Bucket size used when grouping a date column.
      - `sorts` SortMemoColumns[]
        - `column` union, required — The column to sort by: an enum member, or an int id referring to a project-metadata column
          - 'M_TITLE' | 'M_CONTENT' | 'M_USER_ID' | 'M_ATTACHED_OBJECT_TYPE' | 'M_ATTACHED_OBJECT_ID' | 'M_CREATED' | 'M_UPDATED' | 'M_FAVORITE'
          - integer
        - `direction` 'asc' | 'desc', required — Sort direction. `apply` appends `.nulls_last()` so rows missing a value sink to the bottom regardless of direction.
      - `selected_properties` MemoColumns[], nullable
      - `id` integer, required
      - `user_id` integer, required
      - `position` integer, required
      - `created` string, date-time, required
      - `updated` string, date-time, required
    - SpanSearchViewRead
      - `entity_type` 'span_annotation'
      - `project_id` integer, required
      - `name` string, required
      - `layout` 'table' | 'list' | 'board' | 'gallery' | 'feed', required
      - `filters` FilterSpanColumnsOutput, required
        - `id` string, required — Unique id of this node within the filter tree
        - `items` union[], required — Child expressions and/or nested filter nodes
          - union
            - FilterExpressionSpanColumns
              - …
            - FilterSpanColumnsOutput — recursive
        - `logic_operator` 'or' | 'and', required — This tells our filter how to combine multiple column expressions.
      - `group_by` GroupConfigSpanColumns
        - `field` 'SP_SPAN_TEXT' | 'SP_CODE_ID_LIST_RECURSIVE' | 'SP_USER_ID' | 'SP_MEMO_CONTENT' | 'SP_SOURCE_SOURCE_DOCUMENT_NAME' | 'SP_TAG_ID_LIST_RECURSIVE' | 'SP_FOLDER_ID_LIST_RECURSIVE', required
        - `date_granularity` 'day' | 'week' | 'month' | 'year' — Bucket size used when grouping a date column.
      - `sorts` SortSpanColumns[]
        - `column` union, required — The column to sort by: an enum member, or an int id referring to a project-metadata column
          - 'SP_SPAN_TEXT' | 'SP_CODE_ID_LIST_RECURSIVE' | 'SP_USER_ID' | 'SP_MEMO_CONTENT' | 'SP_SOURCE_SOURCE_DOCUMENT_NAME' | 'SP_TAG_ID_LIST_RECURSIVE' | 'SP_FOLDER_ID_LIST_RECURSIVE'
          - integer
        - `direction` 'asc' | 'desc', required — Sort direction. `apply` appends `.nulls_last()` so rows missing a value sink to the bottom regardless of direction.
      - `selected_properties` SpanColumns[], nullable
      - `id` integer, required
      - `user_id` integer, required
      - `position` integer, required
      - `created` string, date-time, required
      - `updated` string, date-time, required
    - SentenceSearchViewRead
      - `entity_type` 'sentence_annotation'
      - `project_id` integer, required
      - `name` string, required
      - `layout` 'table' | 'list' | 'board' | 'gallery' | 'feed', required
      - `filters` FilterSentAnnoColumnsOutput, required
        - `id` string, required — Unique id of this node within the filter tree
        - `items` union[], required — Child expressions and/or nested filter nodes
          - union
            - FilterExpressionSentAnnoColumns
              - …
            - FilterSentAnnoColumnsOutput — recursive
        - `logic_operator` 'or' | 'and', required — This tells our filter how to combine multiple column expressions.
      - `group_by` GroupConfigSentAnnoColumns
        - `field` 'SentAnno_CODE_ID_LIST_RECURSIVE' | 'SentAnno_USER_ID' | 'SentAnno_MEMO_CONTENT' | 'SentAnno_SOURCE_SOURCE_DOCUMENT_NAME' | 'SentAnno_TAG_ID_LIST_RECURSIVE' | 'SentAnno_FOLDER_ID_LIST_RECURSIVE', required
        - `date_granularity` 'day' | 'week' | 'month' | 'year' — Bucket size used when grouping a date column.
      - `sorts` SortSentAnnoColumns[]
        - `column` union, required — The column to sort by: an enum member, or an int id referring to a project-metadata column
          - 'SentAnno_CODE_ID_LIST_RECURSIVE' | 'SentAnno_USER_ID' | 'SentAnno_MEMO_CONTENT' | 'SentAnno_SOURCE_SOURCE_DOCUMENT_NAME' | 'SentAnno_TAG_ID_LIST_RECURSIVE' | 'SentAnno_FOLDER_ID_LIST_RECURSIVE'
          - integer
        - `direction` 'asc' | 'desc', required — Sort direction. `apply` appends `.nulls_last()` so rows missing a value sink to the bottom regardless of direction.
      - `selected_properties` SentAnnoColumns[], nullable
      - `id` integer, required
      - `user_id` integer, required
      - `position` integer, required
      - `created` string, date-time, required
      - `updated` string, date-time, required
    - BBoxSearchViewRead
      - `entity_type` 'bbox_annotation'
      - `project_id` integer, required
      - `name` string, required
      - `layout` 'table' | 'list' | 'board' | 'gallery' | 'feed', required
      - `filters` FilterBBoxColumnsOutput, required
        - `id` string, required — Unique id of this node within the filter tree
        - `items` union[], required — Child expressions and/or nested filter nodes
          - union
            - FilterExpressionBBoxColumns
              - …
            - FilterBBoxColumnsOutput — recursive
        - `logic_operator` 'or' | 'and', required — This tells our filter how to combine multiple column expressions.
      - `group_by` GroupConfigBBoxColumns
        - `field` 'BB_CODE_ID_LIST_RECURSIVE' | 'BB_USER_ID' | 'BB_MEMO_CONTENT' | 'BB_SOURCE_SOURCE_DOCUMENT_NAME' | 'BB_TAG_ID_LIST_RECURSIVE' | 'BB_FOLDER_ID_LIST_RECURSIVE', required
        - `date_granularity` 'day' | 'week' | 'month' | 'year' — Bucket size used when grouping a date column.
      - `sorts` SortBBoxColumns[]
        - `column` union, required — The column to sort by: an enum member, or an int id referring to a project-metadata column
          - 'BB_CODE_ID_LIST_RECURSIVE' | 'BB_USER_ID' | 'BB_MEMO_CONTENT' | 'BB_SOURCE_SOURCE_DOCUMENT_NAME' | 'BB_TAG_ID_LIST_RECURSIVE' | 'BB_FOLDER_ID_LIST_RECURSIVE'
          - integer
        - `direction` 'asc' | 'desc', required — Sort direction. `apply` appends `.nulls_last()` so rows missing a value sink to the bottom regardless of direction.
      - `selected_properties` BBoxColumns[], nullable
      - `id` integer, required
      - `user_id` integer, required
      - `position` integer, required
      - `created` string, date-time, required
      - `updated` string, date-time, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-08-24** `0158a01433d5` — 4 info
  - added the optional property `items/anyOf[subschema #1: MemoSearchViewRead]/selected_properties` to the response with the `200` status
  - added the optional property `items/anyOf[subschema #2: SpanSearchViewRead]/selected_properties` to the response with the `200` status
  - added the optional property `items/anyOf[subschema #3: SentenceSearchViewRead]/selected_properties` to the response with the `200` status
  - added the optional property `items/anyOf[subschema #4: BBoxSearchViewRead]/selected_properties` to the response with the `200` status
- **2026-08-20** `28b2f0e8bc01` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/uhh-lt/apis/discourse-analysis-tool-suite-api/changes/searchView/project/:project_id/get.md)

---

[API](https://skmtc.dev/uhh-lt/apis/discourse-analysis-tool-suite-api.md) · [All operations](https://skmtc.dev/uhh-lt/apis/discourse-analysis-tool-suite-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/uhh-lt/discourse-analysis-tool-suite-api/revisions/a84d27ef7a0d/schema)
