# Events

Events in Prism / Objects — 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}/event`

````text
client.prism.objects.events.list(*, team_id, **params) -> EventListResponse
````

Convenience list endpoint. Equivalent to `POST /v2/prism/{teamId}/{objectType}/query` with an empty body, plus query-string sugar for the common cases. Any unrecognized query parameter is interpreted as an equality filter on a property of that name; pass arrays for `in`. Values are received as strings, so non-string property filters via this endpoint may not work — use the `query` endpoint for typed comparisons or anything beyond simple equality.

## count

`GET /v2/prism/{teamId}/event/count`

````text
client.prism.objects.events.count(*, team_id, **params) -> EventCountResponse
````

Returns the total number of records of this object type that the caller can see. Avoids the page-overshoot anti-pattern — clients no longer need to keep paging until `has_more` flips false to discover the total. Currently does not apply query filters; for a filtered total, pass `include_total: true` in a POST `/query` body.

## find

`GET /v2/prism/{teamId}/event/by/{slug}/{value}`

````text
client.prism.objects.events.find(value, *, team_id, slug, **params) -> EventFindResponse
````

Returns the single record whose property `{slug}` equals `{value}`. 404 if nothing matches; 409 if more than one record matches.

## get

`GET /v2/prism/{teamId}/event/{eventId}`

````text
client.prism.objects.events.get(event_id, *, team_id, **params) -> EventGetResponse
````

Get object

## query

`POST /v2/prism/{teamId}/event/query`

````text
client.prism.objects.events.query(*, team_id, **params) -> EventQueryResponse
````

Query

## Parameter and response types

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

### EventListParams

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `team_id` | `str` | No | API name: `teamId`. |
| `cursor` | `str` | No | Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged to fetch the next page. |
| `deleted` | `bool` | No | Include soft-deleted records. Pass the literal string `true`. |
| `include_total` | `bool` | No | When set to `true`, the response includes a `total` field with the unpaginated row count. Costs an extra pass; prefer `GET .../count` for the unfiltered total. |
| `limit` | `int` | No | Maximum number of rows to return. Capped server-side at 50. |
| `list_id` | `str` | No | Scope properties to a specific list/app. |
| `select` | `str` | No | Comma-separated property slugs to return. Use dot notation for relationships. `id` is always returned at the top level. Defaults to all properties. |
| `sort` | `str` | No | Comma-separated list of slugs. Prefix with `-` for descending. Example: `sort=-updated_at,name`. |

### Data

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

Row returned by the query endpoint. `id` is always present at the top level. Selected property values are returned under `properties`, keyed by property slug. Reference-typed values are returned as nested `{ id, properties }` objects.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `str` | Yes | — |
| `is_user_object` | `Optional[bool]` | No | — |
| `properties` | `Optional[Dict[str, object]]` | No | Selected property values keyed by property slug. For select/multiselect properties, option slugs are returned. For reference properties, values are nested `{ id, properties }` objects. |
| `source` | `Optional[List[str]]` | No | — |

### EventListResponse

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `List[Data]` | Yes | — |
| `has_more` | `bool` | Yes | Accurate end-of-data signal — false on the last page, never forces clients to overshoot. |
| `next_cursor` | `Optional[str]` | No | — |
| `total` | `Optional[int]` | No | Populated only when `?include_total=true` was passed. |

### EventCountParams

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `team_id` | `str` | No | API name: `teamId`. |
| `list_id` | `str` | No | Scope the count to a specific list/app. |

### EventCountResponse

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `total` | `int` | Yes | Number of records matching the access scope. |

### EventFindParams

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `team_id` | `str` | No | API name: `teamId`. |
| `slug` | `Required[str]` | Yes | — |
| `list_id` | `str` | No | Scope the lookup to a specific list/app. |

### EventFindResponse

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

Object returned by reads (get/create/patch/restore). id is always present.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `str` | Yes | — |
| `default` | `Optional[Dict[str, object]]` | No | Properties keyed by property slug. |
| `list` | `Optional[object]` | No | — |

### EventGetParams

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `team_id` | `str` | No | API name: `teamId`. |
| `select` | `str` | No | Comma-separated property slugs to return. Use dot notation for relationships. `id` is always returned at the top level. Defaults to all properties. |

### EventGetResponse

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

Object returned by reads (get/create/patch/restore). id is always present.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `str` | Yes | — |
| `default` | `Optional[Dict[str, object]]` | No | Properties keyed by property slug. |
| `list` | `Optional[object]` | No | — |

### EventQueryParams

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `team_id` | `str` | No | API name: `teamId`. |
| `query` | `Required[Query]` | Yes | — |
| `id` | `Union[str, SequenceNotStr[str]]` | No | — |
| `boxes` | `SequenceNotStr[str]` | No | — |
| `cursor` | `str` | No | Alternative location for the opaque cursor (a sibling of `query`). Use whichever feels more natural; if both are present, `query.cursor` wins. |
| `deleted` | `bool` | No | — |
| `include_total` | `bool` | No | When true, the response includes a `total` field with the unpaginated row count. Costs an additional pass over the result set — for unfiltered totals prefer `GET /v2/prism/{teamId}/{objectType}/count` instead. |
| `sources` | `SequenceNotStr[str]` | No | — |

### QueryFilterQueryFilterItemPrismQueryFilterEq

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `api_empty` | `Required[Annotated[Union[str, bool], PropertyInfo(alias="=")]]` | Yes | API name: `=`. |

### QueryFilterQueryFilterItemPrismQueryFilterNe

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `api_empty` | `Required[Annotated[Union[str, bool], PropertyInfo(alias="!=")]]` | Yes | API name: `!=`. |

### QueryFilterQueryFilterItemPrismQueryFilterLt

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `api_empty` | `Required[str]` | Yes | API name: `<`. |

### QueryFilterQueryFilterItemPrismQueryFilterGt

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `api_empty` | `Required[str]` | Yes | API name: `>`. |

### QueryFilterQueryFilterItemPrismQueryFilterLte

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `api_empty` | `Required[str]` | Yes | API name: `<=`. |

### QueryFilterQueryFilterItemPrismQueryFilterGte

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `api_empty` | `Required[str]` | Yes | API name: `>=`. |

### QueryFilterQueryFilterItemContains

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `contains` | `Required[Union[str, bool, SequenceNotStr[str]]]` | Yes | — |

### QueryFilterQueryFilterItemBeginsWith

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `begins_with` | `Required[str]` | Yes | — |

### QueryFilterQueryFilterItemEndsWith

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ends_with` | `Required[str]` | Yes | — |

### QueryFilterQueryFilterItemNotContains

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `not_contains` | `Required[str]` | Yes | — |

### QueryFilterQueryFilterItemExists

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `exists` | `Required[bool]` | Yes | — |

### QueryFilterQueryFilterItemNotExists

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `not_exists` | `Required[bool]` | Yes | — |

### QueryFilterQueryFilterItemIsNull

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `is_null` | `Required[Union[str, bool, SequenceNotStr[str]]]` | Yes | — |

### QueryFilterQueryFilterItemIsNotNull

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `is_not_null` | `Required[Union[str, bool, SequenceNotStr[str]]]` | Yes | — |

### QueryFilterQueryFilterItemBetween

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `between` | `Required[Union[str, bool, SequenceNotStr[str]]]` | Yes | — |

### QueryFilterQueryFilterItemIn

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

````text
class QueryFilterQueryFilterItemIn(_QueryFilterQueryFilterItemInReservedKeywords, total=False):
````


### QueryFilterQueryFilterItemNotIn

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `not_in` | `Required[SequenceNotStr[str]]` | Yes | — |

<span id="event_query_paramspy"></span>

### QueryFilterQueryFilterItem

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

`QueryFilterQueryFilterItem = Union[`

### Query

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `select` | `Required[SequenceNotStr[str]]` | Yes | Property slugs to select. Use dot notation for relationships (e.g. attendee.contact.first_name). `id` is always returned at the top level of each row and does not need to be selected. |
| `combinator` | `Literal["AND", "OR"]` | No | Logical operator for combining filters |
| `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 and any explicit values are ignored. |
| `filter` | `Iterable[Dict[str, QueryFilterQueryFilterItem]]` | No | Filters as [&#123; slug: &#123; operator: value &#125; &#125;]. For select/multiselect properties, values may be option slugs or option UUIDs. |
| `limit` | `int` | No | Maximum number of rows to return. Capped server-side at 50; requests above the cap are rejected. |
| `list_id` | `str` | No | — |
| `page` | `int` | No | Page number (1-based). Prefer `cursor`. Page-number pagination drifts under concurrent writes; use it only for one-shot exports. |
| `sort` | `Iterable[Dict[str, Literal["asc", "desc"]]]` | No | Sort order as [&#123; slug: direction &#125;]. Array order determines sort priority |

### EventQueryResponse

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `List[Data]` | Yes | — |
| `has_more` | `bool` | Yes | Accurate end-of-data signal. False when this page contains the last record; true only when at least one more record exists. (Implementation note: the server fetches one extra row internally to determine this — clients never need to overshoot to discover the end.) |
| `next_cursor` | `Optional[str]` | No | Opaque cursor pointing at the next page. Pass it back unchanged in the request body (`cursor`) of the next call. Null when `has_more` is false. |
| `total` | `Optional[int]` | No | Only populated when the request set `include_total: true`. Total number of records matching the query, ignoring pagination. Opt-in because it costs an additional pass over the result set. |
