Read a view bundle
client.Views.Get(ctx, viewObjectType, viewID, params) (*ViewGetResponse, error)
GET/v2/prism/{teamId}/{viewObjectType}/views/{viewId}
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}.
Read a view bundle
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"),
)
view, err := client.Views.Get(
context.TODO(),
micro.ViewGetParamsViewObjectTypeAction,
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
micro.ViewGetParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", view)
}
{
"name": "name",
"view_type": "view_type",
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"aggregation_prop_def_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"aggregation_type": "aggregation_type",
"column_layout": {
"foo": "bar"
},
"combinator": "AND",
"created_at": "created_at",
"filter": [
{
"foo": "bar"
}
],
"group_by": "group_by",
"group_hidden_option_ids": [
{}
],
"group_hide_empty": true,
"group_sort": "group_sort",
"icon": "icon",
"list_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"select": [
"string"
],
"sort": [
{
"foo": "bar"
}
],
"sort_order": 0,
"team_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"updated_at": "updated_at",
"user_id": "user_id"
}Returns Examples
{
"name": "name",
"view_type": "view_type",
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"aggregation_prop_def_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"aggregation_type": "aggregation_type",
"column_layout": {
"foo": "bar"
},
"combinator": "AND",
"created_at": "created_at",
"filter": [
{
"foo": "bar"
}
],
"group_by": "group_by",
"group_hidden_option_ids": [
{}
],
"group_hide_empty": true,
"group_sort": "group_sort",
"icon": "icon",
"list_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"select": [
"string"
],
"sort": [
{
"foo": "bar"
}
],
"sort_order": 0,
"team_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"updated_at": "updated_at",
"user_id": "user_id"
}