---
title: "List views"
method: GET
path: "/views"
tags: ["Views"]
---

# List views

`GET /views`

## Request

- Base URL: `https://public.escape.tech/v3`
- URL: `https://public.escape.tech/v3/views`
- Auth: API key in header `X-ESCAPE-API-KEY`

List the saved views of the organization for a given target. Optionally filter by project. Pass `cursor` and `size` to page through the views; without them every matching view is returned.

## Query parameters

- `cursor` string: The cursor to start the pagination from. Returned by the previous page response. If not provided, the first page will be returned.
- `size` integer: The number of items to return per page
- `target` 'ASSETS' | 'EVENTS' | 'INTEGRATIONS' | 'ISSUES' | 'LOCATIONS' | 'PROFILES' | 'SCANS' | 'TARGETS', required: The resource the views apply to
- `projectId` string, uuid: Only return views scoped to this project

## Response `200`

OK

- object
  - `data` object[], required
    - `id` string, uuid, required: The view ID.
    - `name` string, required: The name of the view.
    - `key` string, nullable, required: The managed view key, or null for user-created views.
    - `target` 'ASSETS' | 'EVENTS' | 'INTEGRATIONS' | 'ISSUES' | 'LOCATIONS' | 'PROFILES' | 'SCANS' | 'TARGETS', required: The resource the view applies to.
    - `order` integer, required: The position of the view in the list.
    - `project` object, nullable, required: The project the view is scoped to, if any.
      - `id` string, uuid, required
    - `filters` object, nullable, required: The stored filters of the view.
    - `widgets` string[], required: The stored widget IDs.
    - `columns` string[], required: The stored column IDs.
    - `groupBy` string[], required: The stored group-by keys.
    - `sort` object, nullable, required: The stored sort.
      - `id` string, required: The key to sort by.
      - `direction` 'asc' | 'desc', required: The sort direction.
    - `groupSort` object, nullable, required: The stored group sort.
      - `id` string, required: The key to sort by.
      - `direction` 'asc' | 'desc', required: The sort direction.

## Other responses

- `400`: Pagination error

---

[API](https://skmtc.dev/escape/apis/escape-public-api.md) - [All operations](https://skmtc.dev/escape/apis/escape-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/escape/apis/escape-public-api/revisions/2eab35df40c7?raw)
