## List records selected by a view (filters and sorts applied; pinned record_order overlaid first) `client.Views.Records.List(ctx, viewObjectType, viewID, params) (*ViewRecordListResponse, error)` **get** `/v2/prism/{teamId}/{viewObjectType}/views/{viewId}/records` List records selected by a view (filters and sorts applied; pinned record_order overlaid first) ### Parameters - `viewObjectType ViewRecordListParamsViewObjectType` - `const ViewRecordListParamsViewObjectTypeAction ViewRecordListParamsViewObjectType = "action"` - `const ViewRecordListParamsViewObjectTypeDeal ViewRecordListParamsViewObjectType = "deal"` - `const ViewRecordListParamsViewObjectTypeDocument ViewRecordListParamsViewObjectType = "document"` - `const ViewRecordListParamsViewObjectTypeEvent ViewRecordListParamsViewObjectType = "event"` - `const ViewRecordListParamsViewObjectTypeIdentity ViewRecordListParamsViewObjectType = "identity"` - `const ViewRecordListParamsViewObjectTypeOrganization ViewRecordListParamsViewObjectType = "organization"` - `viewID string` - `params ViewRecordListParams` - `TeamID param.Field[string]` Path param - `Cursor param.Field[string]` Query param: 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 param.Field[int64]` Query param - `Page param.Field[int64]` Query param: Page number (1-based). Prefer `cursor`. ### Returns - `type ViewRecordListResponse struct{…}` - `Data []map[string, unknown]` - `HasMore bool` True if more records exist beyond this page. - `NextCursor string` Opaque cursor for the next page; null when `has_more` is false. ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) records, err := client.Views.Records.List( context.TODO(), micro.ViewRecordListParamsViewObjectTypeAction, "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.ViewRecordListParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", records.Data) } ``` #### Response ```json { "data": [ { "foo": "bar" } ], "has_more": true, "next_cursor": "next_cursor" } ```