# View records

View records in Views — Micro Python reference.

Reference for Python SDK **0.8.0**.

[Release source](https://github.com/micro-so/micro-sdk-py/blob/v0.8.0/api.md) · [Setup and client configuration](/docs/reference/python)

## list

`GET /v2/prism/{teamId}/{viewObjectType}/views/{viewId}/records`

````text
client.views.records.list(view_id, *, team_id, view_object_type, **params) -> RecordListResponse
````

List records selected by a view (filters and sorts applied; pinned record_order overlaid first)

## pin

`POST /v2/prism/{teamId}/{viewObjectType}/views/{viewId}/records/{objectId}`

````text
client.views.records.pin(object_id, *, team_id, view_object_type, view_id) -> None
````

Pin a record to the view (append to record_order)

## reorder

`PATCH /v2/prism/{teamId}/{viewObjectType}/views/{viewId}/records`

````text
client.views.records.reorder(view_id, *, team_id, view_object_type, **params) -> None
````

Bulk reorder pinned records

## unpin

`DELETE /v2/prism/{teamId}/{viewObjectType}/views/{viewId}/records/{objectId}`

````text
client.views.records.unpin(object_id, *, team_id, view_object_type, view_id) -> None
````

Unpin a record from the view

## Parameter and response types

These declarations show the request parameters and response shapes used by the methods above.

### RecordListParams

[Source](https://github.com/micro-so/micro-sdk-py/blob/v0.8.0/src/micro_so/types/views/record_list_params.py)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `team_id` | `str` | No | API name: `teamId`. |
| `view_object_type` | `Required[` | Yes | — |
| `cursor` | `str` | No | Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged to fetch the next page. When set, `page` and `limit` are derived from the cursor. |
| `limit` | `int` | No | — |
| `page` | `int` | No | Page number (1-based). Prefer `cursor`. |

### RecordListResponse

[Source](https://github.com/micro-so/micro-sdk-py/blob/v0.8.0/src/micro_so/types/views/record_list_response.py)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `List[Dict[str, object]]` | Yes | — |
| `has_more` | `bool` | Yes | True if more records exist beyond this page. |
| `next_cursor` | `Optional[str]` | No | Opaque cursor for the next page; null when `has_more` is false. |

### RecordReorderParams

[Source](https://github.com/micro-so/micro-sdk-py/blob/v0.8.0/src/micro_so/types/views/record_reorder_params.py)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `team_id` | `str` | No | API name: `teamId`. |
| `view_object_type` | `Required[` | Yes | — |
| `object_ids` | `Required[SequenceNotStr[str]]` | Yes | — |
| `idempotency_key` | `str` | No | API name: `Idempotency-Key`. |
