Skip to content
API Reference
Lists and views

Views

Views — Micro Python reference.

Reference for Python SDK 0.8.0.

Release source · Setup and client configuration

create

POST /v2/prism/{teamId}/{viewObjectType}/views

client.views.create(view_object_type, *, path_team_id, **params) -> ViewCreateResponse

Create a view bundle (view + select/filter/sort)

update

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

client.views.update(view_id, *, path_team_id, view_object_type, **params) -> ViewUpdateResponse

Update a view bundle (select/filter/sort arrays are replaced wholesale when supplied)

delete

DELETE /v2/prism/{teamId}/{viewObjectType}/views/{viewId}

client.views.delete(view_id, *, team_id, view_object_type) -> None

Delete a view bundle

get

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

client.views.get(view_id, *, team_id, view_object_type, **params) -> ViewGetResponse

Returns the view bundle. Pass ?include=records to also fetch a page of records selected by the view in the same call; the response is then wrapped as {view, records}.

Parameter and response types

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

ViewCreateParams

Source

FieldTypeRequiredDescription
path_team_idstrNoAPI name: teamId.
nameRequired[str]Yes
view_typeRequired[str]Yes
idstrNo
aggregation_prop_def_idOptional[str]No
aggregation_typeOptional[str]No
column_layoutOptional[Dict[str, object]]No
combinatorLiteral["AND", "OR"]No
created_atstrNo
filterIterable[Dict[str, object]]NoEach entry is { slug: { comparator: value } }
group_byOptional[str]NoProperty slug to group by
group_hidden_option_idsUnion[Iterable[object], object, None]No
group_hide_emptyOptional[bool]No
group_sortOptional[str]No
iconOptional[str]No
list_idOptional[str]No
selectSequenceNotStr[str]NoProperty slugs (dot-paths permitted for refs)
sortIterable[Dict[str, object]]NoEach entry is { slug: 'asc' | 'desc' }
sort_orderOptional[int]No
body_team_idOptional[str]NoAPI name: team_id.
updated_atOptional[str]No
user_idOptional[str]No
idempotency_keystrNoAPI name: Idempotency-Key.

ViewCreateResponse

Source

A view (saved configuration for displaying records of a given object type) plus its select/filter/sort children. Properties in select/filter/sort are referenced by slug.

FieldTypeRequiredDescription
namestrYes
view_typestrYes
idOptional[str]No
aggregation_prop_def_idOptional[str]No
aggregation_typeOptional[str]No
column_layoutOptional[Dict[str, object]]No
combinatorOptional[Literal["AND", "OR"]]No
created_atOptional[str]No
filterOptional[List[Dict[str, object]]]NoEach entry is { slug: { comparator: value } }
group_byOptional[str]NoProperty slug to group by
group_hidden_option_idsUnion[List[object], object, None]No
group_hide_emptyOptional[bool]No
group_sortOptional[str]No
iconOptional[str]No
list_idOptional[str]No
selectOptional[List[str]]NoProperty slugs (dot-paths permitted for refs)
sortOptional[List[Dict[str, object]]]NoEach entry is { slug: 'asc' | 'desc' }
sort_orderOptional[int]No
team_idOptional[str]No
updated_atOptional[str]No
user_idOptional[str]No

ViewUpdateParams

Source

FieldTypeRequiredDescription
path_team_idstrNoAPI name: teamId.
view_object_typeRequired[Yes
aggregation_prop_def_idOptional[str]No
aggregation_typeOptional[str]No
column_layoutOptional[Dict[str, object]]No
combinatorLiteral["AND", "OR"]No
filterIterable[Dict[str, object]]No
group_byOptional[str]No
group_hidden_option_idsUnion[Iterable[object], object, None]No
group_hide_emptyOptional[bool]No
group_sortOptional[str]No
iconOptional[str]No
list_idOptional[str]No
namestrNo
selectSequenceNotStr[str]No
sortIterable[Dict[str, object]]No
sort_orderOptional[int]No
body_team_idOptional[str]NoAPI name: team_id.
user_idOptional[str]No
view_typestrNo
idempotency_keystrNoAPI name: Idempotency-Key.

ViewUpdateResponse

Source

A view (saved configuration for displaying records of a given object type) plus its select/filter/sort children. Properties in select/filter/sort are referenced by slug.

FieldTypeRequiredDescription
namestrYes
view_typestrYes
idOptional[str]No
aggregation_prop_def_idOptional[str]No
aggregation_typeOptional[str]No
column_layoutOptional[Dict[str, object]]No
combinatorOptional[Literal["AND", "OR"]]No
created_atOptional[str]No
filterOptional[List[Dict[str, object]]]NoEach entry is { slug: { comparator: value } }
group_byOptional[str]NoProperty slug to group by
group_hidden_option_idsUnion[List[object], object, None]No
group_hide_emptyOptional[bool]No
group_sortOptional[str]No
iconOptional[str]No
list_idOptional[str]No
selectOptional[List[str]]NoProperty slugs (dot-paths permitted for refs)
sortOptional[List[Dict[str, object]]]NoEach entry is { slug: 'asc' | 'desc' }
sort_orderOptional[int]No
team_idOptional[str]No
updated_atOptional[str]No
user_idOptional[str]No

ViewGetParams

Source

FieldTypeRequiredDescription
team_idstrNoAPI name: teamId.
view_object_typeRequired[Yes
cursorstrNoForwarded to the records sub-resource when include=records.
includestrNoComma-separated list of optional sub-resources to inline. Currently the only recognized value is records — when present, the response is {view, records} rather than the bare view bundle.
limitintNoForwarded to the records sub-resource when include=records.
pageintNoForwarded to the records sub-resource when include=records.

ViewBundle

Source

A view (saved configuration for displaying records of a given object type) plus its select/filter/sort children. Properties in select/filter/sort are referenced by slug.

FieldTypeRequiredDescription
namestrYes
view_typestrYes
idOptional[str]No
aggregation_prop_def_idOptional[str]No
aggregation_typeOptional[str]No
column_layoutOptional[Dict[str, object]]No
combinatorOptional[Literal["AND", "OR"]]No
created_atOptional[str]No
filterOptional[List[Dict[str, object]]]NoEach entry is { slug: { comparator: value } }
group_byOptional[str]NoProperty slug to group by
group_hidden_option_idsUnion[List[object], object, None]No
group_hide_emptyOptional[bool]No
group_sortOptional[str]No
iconOptional[str]No
list_idOptional[str]No
selectOptional[List[str]]NoProperty slugs (dot-paths permitted for refs)
sortOptional[List[Dict[str, object]]]NoEach entry is { slug: 'asc' | 'desc' }
sort_orderOptional[int]No
team_idOptional[str]No
updated_atOptional[str]No
user_idOptional[str]No

ViewBundleWithRecordsRecords

Source

FieldTypeRequiredDescription
dataList[Dict[str, object]]Yes
has_moreboolYes
next_cursorOptional[str]No

ViewBundleWithRecordsView

Source

A view (saved configuration for displaying records of a given object type) plus its select/filter/sort children. Properties in select/filter/sort are referenced by slug.

FieldTypeRequiredDescription
namestrYes
view_typestrYes
idOptional[str]No
aggregation_prop_def_idOptional[str]No
aggregation_typeOptional[str]No
column_layoutOptional[Dict[str, object]]No
combinatorOptional[Literal["AND", "OR"]]No
created_atOptional[str]No
filterOptional[List[Dict[str, object]]]NoEach entry is { slug: { comparator: value } }
group_byOptional[str]NoProperty slug to group by
group_hidden_option_idsUnion[List[object], object, None]No
group_hide_emptyOptional[bool]No
group_sortOptional[str]No
iconOptional[str]No
list_idOptional[str]No
selectOptional[List[str]]NoProperty slugs (dot-paths permitted for refs)
sortOptional[List[Dict[str, object]]]NoEach entry is { slug: 'asc' | 'desc' }
sort_orderOptional[int]No
team_idOptional[str]No
updated_atOptional[str]No
user_idOptional[str]No

ViewBundleWithRecords

Source

Returned by GET /views/{viewId}?include=records. Same records shape as the standalone list-view-records endpoint.

FieldTypeRequiredDescription
recordsViewBundleWithRecordsRecordsYes
viewViewBundleWithRecordsViewYesA view (saved configuration for displaying records of a given object type) plus its select/filter/sort children. Properties in select/filter/sort are referenced by slug.

ViewGetResponse

Source

ViewGetResponse = Union[ViewBundle, ViewBundleWithRecords]

micro.so