Skip to main content
GET
/
views
/
{id}
JavaScript
import Moonbase from '@moonbaseai/sdk';

const client = new Moonbase({
  apiKey: process.env['MOONBASE_API_KEY'], // This is the default and can be omitted
});

const view = await client.views.retrieve('id');

console.log(view.id);
{
  "id": "1CLJt2ucYeneC79PG8xXku",
  "type": "view",
  "view_type": "table",
  "name": "All",
  "created_at": "2025-02-17T16:00:00.000Z",
  "updated_at": "2025-02-17T16:00:00.000Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.moonbase.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Your Moonbase API key.

Path Parameters

id
string
required

The ID of the view to retrieve.

Query Parameters

include[]
enum<string>[]

Specifies which related objects to include in the response. Valid option is collection.

Available options:
collection

Response

Successful response.

A View represents a saved configuration for displaying items in a collection, including filters and sorting rules.

type
string
required

String representing the object’s type. Always view for this object.

Allowed value: "view"
id
string
required

Unique identifier for the object.

view_type
enum<string>
required

The type of view, such as table or board.

Available options:
table,
board
name
string
required

The name of the view.

created_at
string<date-time>
required

Time at which the object was created, as an ISO 8601 timestamp in UTC.

updated_at
string<date-time>
required

Time at which the object was last updated, as an ISO 8601 timestamp in UTC.

collection
Collection · object

The Collection this view belongs to.

Note: Only present when requested using the include query parameter.