---
title: "Search for views"
method: POST
path: "/views/search"
tags: ["views"]
---

# Search for views

`POST /views/search`

Based on view properties (currently only name) search for views.

## Headers

- `x-budibase-app-id` string, required

## Request body

- NameSearch
  - `name` string, required — The name to be used when searching - this will be used in a case insensitive starts with match.

## Response `200`

Returns the found views, based on the search parameters.

- ViewSearch
  - `data` object[], required
    - `name` string, required — The name of the view.
    - `tableId` string, required — The ID of the table this view is based on.
    - `type` 'calculation' — The type of view - standard (empty value) or calculation.
    - `primaryDisplay` string — A column used to display rows from this view - usually used when rendered in tables.
    - `query` object — Search parameters for view
      - `logicalOperator` 'all' | 'any' — When using groups this defines whether all of the filters must match, or only one of them.
      - `onEmptyFilter` 'all' | 'none' — If no filters match, should the view return all rows, or no rows.
      - `groups` object[] — A grouping of filters to be applied.
        - `logicalOperator` 'all' | 'any' — When using groups this defines whether all of the filters must match, or only one of them.
        - `filters` object[] — A list of filters to apply
          - `operator` 'equal' | 'notEqual' | 'empty' | 'notEmpty' | 'fuzzy' | 'string' | 'contains' | 'notContains' | 'containsAny' | 'oneOf' | 'notOneOf' | 'range' — The type of search operation which is being performed.
          - `field` string — The field in the view to perform the search on.
          - `value` union — The value to search for - the type will depend on the operator in use.
            - string
            - number
            - boolean
            - object
        - `groups` object[] — A grouping of filters to be applied.
          - `logicalOperator` 'all' | 'any' — When using groups this defines whether all of the filters must match, or only one of them.
          - `filters` object[] — A list of filters to apply
            - `operator` 'equal' | 'notEqual' | 'empty' | 'notEmpty' | 'fuzzy' | 'string' | 'contains' | 'notContains' | 'containsAny' | 'oneOf' | 'notOneOf' | 'range' — The type of search operation which is being performed.
            - `field` string — The field in the view to perform the search on.
            - `value` union — The value to search for - the type will depend on the operator in use.
              - …
    - `sort` union
      - object
        - `field` string, required — The field from the table/view schema to sort on.
        - `order` 'ascending' | 'descending' — The order in which to sort.
        - `type` 'string' | 'number' — The type of sort to perform (by number, or by alphabetically).
      - object[]
        - `field` string, required — The field from the table/view schema to sort on.
        - `order` 'ascending' | 'descending' — The order in which to sort.
        - `type` 'string' | 'number' — The type of sort to perform (by number, or by alphabetically).
    - `schema` object, required
    - `id` string, required — The ID of the view.

---

[API](https://skmtc.net/budibase/apis/budibase-api.md) · [All operations](https://skmtc.net/budibase/apis/budibase-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/budibase/budibase-api/revisions/9c6f16fc652b/schema)
