Skip to content
API Reference
Lists and views

View records

View records in Views — Micro Go reference.

Reference for Go SDK 0.8.0.

Release source · Setup and client configuration

List

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

client.Views.Records.List(ctx context.Context, viewObjectType micro.ViewRecordListParamsViewObjectType, viewID string, params micro.ViewRecordListParams) (*micro.ViewRecordListResponse, error)

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}

client.Views.Records.Pin(ctx context.Context, viewObjectType micro.ViewRecordPinParamsViewObjectType, viewID string, objectID string, params micro.ViewRecordPinParams) error

Pin a record to the view (append to record_order)

Reorder

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

client.Views.Records.Reorder(ctx context.Context, viewObjectType micro.ViewRecordReorderParamsViewObjectType, viewID string, params micro.ViewRecordReorderParams) error

Bulk reorder pinned records

Unpin

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

client.Views.Records.Unpin(ctx context.Context, viewObjectType micro.ViewRecordUnpinParamsViewObjectType, viewID string, objectID string, body micro.ViewRecordUnpinParams) error

Unpin a record from the view

Parameter and response types

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

ViewRecordListResponse

Source

type ViewRecordListResponse struct {
	Data []map[string]interface{} `json:"data" api:"required"`
	// True if more records exist beyond this page.
	HasMore bool `json:"has_more" api:"required"`
	// Opaque cursor for the next page; null when `has_more` is false.
	NextCursor string                     `json:"next_cursor" api:"nullable"`
	JSON       viewRecordListResponseJSON `json:"-"`
}

ViewRecordListParamsViewObjectType

Source

type ViewRecordListParamsViewObjectType string

ViewRecordListParams

Source

type ViewRecordListParams 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. When set, `page` and `limit` are derived from the
	// cursor.
	Cursor param.Field[string] `query:"cursor"`
	Limit  param.Field[int64]  `query:"limit"`
	// Page number (1-based). Prefer `cursor`.
	Page param.Field[int64] `query:"page"`
}

ViewRecordPinParamsViewObjectType

Source

type ViewRecordPinParamsViewObjectType string

ViewRecordPinParams

Source

type ViewRecordPinParams 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"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

ViewRecordReorderParamsViewObjectType

Source

type ViewRecordReorderParamsViewObjectType string

ViewRecordReorderParams

Source

type ViewRecordReorderParams 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"`
	ObjectIDs      param.Field[[]string] `json:"object_ids" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string]   `header:"Idempotency-Key"`
}

ViewRecordUnpinParamsViewObjectType

Source

type ViewRecordUnpinParamsViewObjectType string

ViewRecordUnpinParams

Source

type ViewRecordUnpinParams 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"`
}
micro.so