---
title: "Creates a personal search view"
method: POST
path: "/searchView"
tags: ["searchView"]
---

# Creates a personal search view

`POST /searchView`

## Request body

- union
  - MemoSearchViewCreate
    - `entity_type` 'memo'
    - `project_id` integer, required
    - `name` string, required
    - `layout` 'table' | 'list' | 'board' | 'gallery' | 'feed', required
    - `filters` FilterMemoColumnsInput, 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
            - `id` string, required — Unique id of this expression within the filter tree
            - `column` union, required — The column to filter on: an enum member, or an int id referring to a project-metadata column
              - …
            - `operator` union, required — The comparison operator applied to the column
              - …
            - `value` union, required — The value the column is compared against
              - …
          - FilterMemoColumnsInput — 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
  - SpanSearchViewCreate
    - `entity_type` 'span_annotation'
    - `project_id` integer, required
    - `name` string, required
    - `layout` 'table' | 'list' | 'board' | 'gallery' | 'feed', required
    - `filters` FilterSpanColumnsInput, 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
            - `id` string, required — Unique id of this expression within the filter tree
            - `column` union, required — The column to filter on: an enum member, or an int id referring to a project-metadata column
              - …
            - `operator` union, required — The comparison operator applied to the column
              - …
            - `value` union, required — The value the column is compared against
              - …
          - FilterSpanColumnsInput — 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
  - SentenceSearchViewCreate
    - `entity_type` 'sentence_annotation'
    - `project_id` integer, required
    - `name` string, required
    - `layout` 'table' | 'list' | 'board' | 'gallery' | 'feed', required
    - `filters` FilterSentAnnoColumnsInput, 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
            - `id` string, required — Unique id of this expression within the filter tree
            - `column` union, required — The column to filter on: an enum member, or an int id referring to a project-metadata column
              - …
            - `operator` union, required — The comparison operator applied to the column
              - …
            - `value` union, required — The value the column is compared against
              - …
          - FilterSentAnnoColumnsInput — 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
  - BBoxSearchViewCreate
    - `entity_type` 'bbox_annotation'
    - `project_id` integer, required
    - `name` string, required
    - `layout` 'table' | 'list' | 'board' | 'gallery' | 'feed', required
    - `filters` FilterBBoxColumnsInput, 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
            - `id` string, required — Unique id of this expression within the filter tree
            - `column` union, required — The column to filter on: an enum member, or an int id referring to a project-metadata column
              - …
            - `operator` union, required — The comparison operator applied to the column
              - …
            - `value` union, required — The value the column is compared against
              - …
          - FilterBBoxColumnsInput — 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

## Response `200`

Successful Response

- 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
            - `id` string, required — Unique id of this expression within the filter tree
            - `column` union, required — The column to filter on: an enum member, or an int id referring to a project-metadata column
              - …
            - `operator` union, required — The comparison operator applied to the column
              - …
            - `value` union, required — The value the column is compared against
              - …
          - 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
            - `id` string, required — Unique id of this expression within the filter tree
            - `column` union, required — The column to filter on: an enum member, or an int id referring to a project-metadata column
              - …
            - `operator` union, required — The comparison operator applied to the column
              - …
            - `value` union, required — The value the column is compared against
              - …
          - 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
            - `id` string, required — Unique id of this expression within the filter tree
            - `column` union, required — The column to filter on: an enum member, or an int id referring to a project-metadata column
              - …
            - `operator` union, required — The comparison operator applied to the column
              - …
            - `value` union, required — The value the column is compared against
              - …
          - 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
            - `id` string, required — Unique id of this expression within the filter tree
            - `column` union, required — The column to filter on: an enum member, or an int id referring to a project-metadata column
              - …
            - `operator` union, required — The comparison operator applied to the column
              - …
            - `value` union, required — The value the column is compared against
              - …
          - 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

---

[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)
