Events
Events in Prism / Objects — Micro Go reference.
Reference for Go SDK 0.8.0.
Release source · Setup and client configuration
List
GET /v2/prism/{teamId}/event
client.Prism.Objects.Events.List(ctx context.Context, params micro.PrismObjectEventListParams) (*micro.PrismObjectEventListResponse, error)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
client.Prism.Objects.Events.Count(ctx context.Context, params micro.PrismObjectEventCountParams) (*micro.PrismObjectEventCountResponse, error)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}
client.Prism.Objects.Events.Find(ctx context.Context, slug string, value string, params micro.PrismObjectEventFindParams) (*micro.PrismObjectEventFindResponse, error)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}
client.Prism.Objects.Events.Get(ctx context.Context, eventID string, params micro.PrismObjectEventGetParams) (*micro.PrismObjectEventGetResponse, error)Get object
Query
POST /v2/prism/{teamId}/event/query
client.Prism.Objects.Events.Query(ctx context.Context, params micro.PrismObjectEventQueryParams) (*micro.PrismObjectEventQueryResponse, error)Query
Parameter and response types
These declarations show the request parameters and response shapes used by the methods above.
PrismObjectEventListResponse
type PrismObjectEventListResponse struct {
Data []PrismObjectEventListResponseData `json:"data" api:"required"`
// Accurate end-of-data signal — false on the last page, never forces clients to
// overshoot.
HasMore bool `json:"has_more" api:"required"`
NextCursor string `json:"next_cursor" api:"nullable"`
// Populated only when `?include_total=true` was passed.
Total int64 `json:"total" api:"nullable"`
JSON prismObjectEventListResponseJSON `json:"-"`
}PrismObjectEventCountResponse
type PrismObjectEventCountResponse struct {
// Number of records matching the access scope.
Total int64 `json:"total" api:"required"`
JSON prismObjectEventCountResponseJSON `json:"-"`
}PrismObjectEventFindResponse
type PrismObjectEventFindResponse struct {
ID string `json:"id" api:"required" format:"uuid"`
// Properties keyed by property slug.
Default map[string]interface{} `json:"default"`
List interface{} `json:"list"`
JSON prismObjectEventFindResponseJSON `json:"-"`
}PrismObjectEventGetResponse
type PrismObjectEventGetResponse struct {
ID string `json:"id" api:"required" format:"uuid"`
// Properties keyed by property slug.
Default map[string]interface{} `json:"default"`
List interface{} `json:"list"`
JSON prismObjectEventGetResponseJSON `json:"-"`
}PrismObjectEventQueryResponse
type PrismObjectEventQueryResponse struct {
Data []PrismObjectEventQueryResponseData `json:"data" api:"required"`
// 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.)
HasMore bool `json:"has_more" api:"required"`
// 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.
NextCursor string `json:"next_cursor" api:"nullable"`
// 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.
Total int64 `json:"total" api:"nullable"`
JSON prismObjectEventQueryResponseJSON `json:"-"`
}PrismObjectEventListParams
type PrismObjectEventListParams struct {
// Use [option.WithTeamID] on the client to set a global default for this field.
TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
// Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged
// to fetch the next page.
Cursor param.Field[string] `query:"cursor"`
// Include soft-deleted records. Pass the literal string `true`.
Deleted param.Field[bool] `query:"deleted"`
// 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.
IncludeTotal param.Field[bool] `query:"include_total"`
// Maximum number of rows to return. Capped server-side at 50.
Limit param.Field[int64] `query:"limit"`
// Scope properties to a specific list/app.
ListID param.Field[string] `query:"list_id" format:"uuid"`
// Comma-separated property slugs to return. Use dot notation for relationships.
// `id` is always returned at the top level. Defaults to all properties.
Select param.Field[string] `query:"select"`
// Comma-separated list of slugs. Prefix with `-` for descending. Example:
// `sort=-updated_at,name`.
Sort param.Field[string] `query:"sort"`
}PrismObjectEventCountParams
type PrismObjectEventCountParams struct {
// Use [option.WithTeamID] on the client to set a global default for this field.
TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
// Scope the count to a specific list/app.
ListID param.Field[string] `query:"list_id" format:"uuid"`
}PrismObjectEventFindParams
type PrismObjectEventFindParams struct {
// Use [option.WithTeamID] on the client to set a global default for this field.
TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
// Scope the lookup to a specific list/app.
ListID param.Field[string] `query:"list_id" format:"uuid"`
}PrismObjectEventGetParams
type PrismObjectEventGetParams struct {
// Use [option.WithTeamID] on the client to set a global default for this field.
TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
// Comma-separated property slugs to return. Use dot notation for relationships.
// `id` is always returned at the top level. Defaults to all properties.
Select param.Field[string] `query:"select"`
}PrismObjectEventQueryParams
type PrismObjectEventQueryParams struct {
// Use [option.WithTeamID] on the client to set a global default for this field.
TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
Query param.Field[PrismObjectEventQueryParamsQuery] `json:"query" api:"required"`
ID param.Field[PrismObjectEventQueryParamsIDUnion] `json:"id" format:"uuid"`
Boxes param.Field[[]string] `json:"boxes"`
// Alternative location for the opaque cursor (a sibling of `query`). Use whichever
// feels more natural; if both are present, `query.cursor` wins.
Cursor param.Field[string] `json:"cursor"`
Deleted param.Field[bool] `json:"deleted"`
// 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.
IncludeTotal param.Field[bool] `json:"include_total"`
Sources param.Field[[]string] `json:"sources" format:"uuid"`
}PrismObjectEventListResponseData
type PrismObjectEventListResponseData struct {
ID string `json:"id" api:"required" format:"uuid"`
IsUserObject bool `json:"is_user_object"`
// Selected property values keyed by property slug. For select/multiselect
// properties, option slugs are returned. For reference properties, values are
// nested `{ id, properties }` objects.
Properties map[string]interface{} `json:"properties"`
Source []string `json:"source" api:"nullable"`
JSON prismObjectEventListResponseDataJSON `json:"-"`
}PrismObjectEventQueryResponseData
type PrismObjectEventQueryResponseData struct {
ID string `json:"id" api:"required" format:"uuid"`
IsUserObject bool `json:"is_user_object"`
// Selected property values keyed by property slug. For select/multiselect
// properties, option slugs are returned. For reference properties, values are
// nested `{ id, properties }` objects.
Properties map[string]interface{} `json:"properties"`
Source []string `json:"source" api:"nullable"`
JSON prismObjectEventQueryResponseDataJSON `json:"-"`
}PrismObjectEventQueryParamsQuery
type PrismObjectEventQueryParamsQuery struct {
// 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.
Select param.Field[[]string] `json:"select" api:"required"`
// Logical operator for combining filters
Combinator param.Field[PrismObjectEventQueryParamsQueryCombinator] `json:"combinator"`
// 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.
Cursor param.Field[string] `json:"cursor"`
// Filters as [{ slug: { operator: value } }]. For select/multiselect properties,
// values may be option slugs or option UUIDs.
Filter param.Field[[]map[string]PrismObjectEventQueryParamsQueryFilterUnion] `json:"filter"`
// Maximum number of rows to return. Capped server-side at 50; requests above the
// cap are rejected.
Limit param.Field[int64] `json:"limit"`
ListID param.Field[string] `json:"list_id" format:"uuid"`
// Page number (1-based). Prefer `cursor`. Page-number pagination drifts under
// concurrent writes; use it only for one-shot exports.
//
// Deprecated: deprecated
Page param.Field[int64] `json:"page"`
// Sort order as [{ slug: direction }]. Array order determines sort priority
Sort param.Field[[]map[string]PrismObjectEventQueryParamsQuerySort] `json:"sort"`
}PrismObjectEventQueryParamsIDUnion
type PrismObjectEventQueryParamsIDUnion interface {
ImplementsPrismObjectEventQueryParamsIDUnion()
}PrismObjectEventQueryParamsQueryCombinator
type PrismObjectEventQueryParamsQueryCombinator stringPrismObjectEventQueryParamsQueryFilterUnion
type PrismObjectEventQueryParamsQueryFilterUnion interface {
implementsPrismObjectEventQueryParamsQueryFilterUnion()
}PrismObjectEventQueryParamsQuerySort
type PrismObjectEventQueryParamsQuerySort string