Skip to content
Go to Micro

List saved views for an owner

client.views.list("comment" | "action" | "deal" | 5 moreobjectType, ViewListParams { teamId, cursor, limit, 2 more } params?, RequestOptionsoptions?): ViewListResponse { data, has_more, next_cursor }
GET/v2/prism/{teamId}/{objectType}/views

Returns saved view bundles for the path team. Pass ?list_id= to scope to a list (CRM) instead. Cursor pagination matches other Prism list endpoints.

ParametersExpand Collapse
objectType: "comment" | "action" | "deal" | 5 more
One of the following:
"comment"
"action"
"deal"
"engagement"
"document"
"event"
"identity"
"organization"
params: ViewListParams { teamId, cursor, limit, 2 more }
teamId?: string

Path param

formatuuid
cursor?: string

Query param: Opaque pagination cursor (from a prior response’s next_cursor); supersedes page/limit when present.

limit?: number

Query param: Maximum items per page (<= 50; defaults to 50).

minimum0
maximum50
list_id?: string

Query param: List (CRM) id to scope the listing to. When omitted, views owned by the path team are returned.

formatuuid
page?: number

Query param: 1-based page number. Prefer cursor.

minimum1
ReturnsExpand Collapse
ViewListResponse { data, has_more, next_cursor }
data: Array<Data>
name: string
view_type: string
id?: string
formatuuid
aggregation_prop_def_id?: string | null
formatuuid
aggregation_type?: string | null
column_layout?: Record<string, unknown> | null
combinator?: "AND" | "OR"
One of the following:
"AND"
"OR"
created_at?: string
filter?: Array<Record<string, unknown>>

Each entry is { slug: { comparator: value } }

group_by?: string | null

Property slug to group by

group_hidden_option_ids?: Array<unknown> | unknown | null
One of the following:
Array<unknown>
unknown
group_hide_empty?: boolean | null
group_sort?: string | null
icon?: string | null
list_id?: string | null
formatuuid
select?: Array<string>

Property slugs (dot-paths permitted for refs)

sort?: Array<Record<string, unknown>>

Each entry is { slug: ‘asc’ | ‘desc’ }

sort_order?: number | null
team_id?: string | null
formatuuid
updated_at?: string | null
user_id?: string | null
has_more: boolean

True if more views exist beyond this page.

next_cursor?: string | null

Opaque cursor for the next page; null when has_more is false.

List saved views for an owner

import Micro from '@micro-so/sdk';

const client = new Micro({
  teamID: 'My Team ID',
  apiKey: process.env['MICRO_API_KEY'], // This is the default and can be omitted
});

const views = await client.views.list('comment');

console.log(views.data);
{
  "data": [
    {
      "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"
    }
  ],
  "has_more": true,
  "next_cursor": "next_cursor"
}
Returns Examples
{
  "data": [
    {
      "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"
    }
  ],
  "has_more": true,
  "next_cursor": "next_cursor"
}