> For the complete documentation index, see [llms.txt](https://docs.medable.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.medable.com/cortex-api/scripting/static-methods/views.md).

# Views

## Views

\_\*\*\_Import

```
const Views = org.objects.views;
// import Views from 'views';
// const Views = CortexObject.as('views');
```

**Methods**

[run(name, options)](https://docs.medable.com/reference#section-run-name-options-)\
[passthru(name, options)](https://docs.medable.com/reference#section-passthru-name-options-)

### run(name, options)

Run a stored View.

**Arguments**

* `name` (String) the view name
* `options`
  * `where`
  * `map`
  * `group`
  * `sort`
  * `paths`
  * `limit`
  * `skip`
  * `pipeline`

**Returns**

Object\[]

### passthru(name, options)

Runs a stored View and returns a cursor (without fetching any results) which can be returned from a route script and streamed directly through the api. See [QueryCursor.passthru()](https://docs.medable.com/reference#section-querycursor-passthru-)

**Arguments**

* `name` (String) the view name
* `options`
  * `where`
  * `map`
  * `group`
  * `sort`
  * `paths`
  * `limit`
  * `skip`
  * `pipeline`

**Returns**
