---
title: "List all search views."
method: GET
path: "/_fabric/{fabric}/_api/search/view"
tags: ["Search"]
---

# List all search views.

`GET /_fabric/{fabric}/_api/search/view`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/macrometa/apis/macrometa-api-reference/docs/_fabric/:fabric/_api/search/view/get.ts> (a function with typed inputs; its response is checked against the schema)

Fetch an array of all search view descriptions.

## Path parameters

- `fabric` string, string, required

## Response `200`

Successfully found search views descriptions.

- ApiSearchGetViewsHttpExamplesRc200
  - `code` integer: HTTP response code.
  - `error` boolean: Flag if there is an error in response. *False* for this response.
  - `result` ApiSearchPostViewHttpExamplesRc201
    - `globallyUniqueId` string: Gloable Unique identifier of the search view.
    - `id` string: Unique identifier of the search view.
    - `name` string: The name of the search view. This field is immutable.
    - `primarySort` object[]: Specify default sorting order. This field is immutable.
      - `field` string: The name of the field.
      - `direction` string: The sorting direction.
    - `links` PostApiViewLinks: The set of collection names associated with the properties.
      - `[collection-name]` PostApiViewLinkProps: The link properties. If specified, *properties* should be a JSON object containing the following attributes:
        - `analyzers` string[]: The list of analyzers to be used for indexing of string values.
        - `fields` PostApiViewFields: A list of link properties that are applied at each document level with each key specifying a document attribute.
          - `[field-name]` object: This is a recursive structure for the specific attribute path, potentially containing any of the following attributes: *analyzers*, *includeAllFields*, *trackListPositions*, *storeValues*. Any attributes not specified are inherited from the parent.
        - `includeAllFields` boolean: The flag determines whether or not to index all fields on a particular level of depth.
        - `storeValues` string: How should the search view track the attribute values, this setting allows for additional value retrieval optimizations, one of: - *none*: Do not store values by the search view - *id*: Store only information about value presence, to allow use of the EXISTS() function.
        - `trackListPositions` boolean: The flag determines whether or not values in a lists should be treated separate.
    - `type` string: The type of the search view. must be equal to *search*.

## Other responses

- `400`: Failed due to missing or malformed data. Verify that all parameters are complete.
- `403`: Failed to validate because you do not have access to the server.
- `404`: Failed to find specified collection.

---

[API](https://skmtc.dev/macrometa/apis/macrometa-api-reference.md) - [All operations](https://skmtc.dev/macrometa/apis/macrometa-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/macrometa/apis/macrometa-api-reference/revisions/2006b6d7f31d?raw)
