Skip to content

Create View

POST
/api/v2/workbooks/{workbook_id}/views
curl --request POST \
--url http://localhost:8000/api/v2/workbooks/example/views \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "config": { "filters": [ { "column": "example", "op": "equals", "value": "example" } ], "hidden_columns": [ "example" ], "sort": [ { "column": "example", "dir": "asc" } ] }, "name": "example" }'

Create a saved view on a workbook.

workbook_id
required
Workbook Id
string
x-workspace-id
Any of:
string
Media typeapplication/json
WorkbookViewCreate
object
config
ViewConfig

Saved-view config: filters + sort + hidden columns.

object
filters
Filters
Array<object>
ViewFilter

One filter clause of a saved view (applied client-side by the editor).

object
column
required
Column

Column id the filter applies to

string
>= 1 characters
op
Op
string
default: contains
Allowed values: equals not_equals contains not_contains empty not_empty
value
Any of:
Value

Comparison value (unused for empty/not_empty)

hidden_columns
Hidden Columns
Array<string>
sort
Sort
Array<object>
ViewSort

One sort clause of a saved view.

object
column
required
Column
string
>= 1 characters
dir
Dir
string
default: asc
Allowed values: asc desc
name
required
Name
string
>= 1 characters <= 255 characters

Successful Response

Media typeapplication/json
WorkbookViewResponse
object
config
required
ViewConfig

Saved-view config: filters + sort + hidden columns.

object
filters
Filters
Array<object>
ViewFilter

One filter clause of a saved view (applied client-side by the editor).

object
column
required
Column

Column id the filter applies to

string
>= 1 characters
op
Op
string
default: contains
Allowed values: equals not_equals contains not_contains empty not_empty
value
Any of:
Value

Comparison value (unused for empty/not_empty)

hidden_columns
Hidden Columns
Array<string>
sort
Sort
Array<object>
ViewSort

One sort clause of a saved view.

object
column
required
Column
string
>= 1 characters
dir
Dir
string
default: asc
Allowed values: asc desc
created_at
Any of:
string format: date-time
id
required
Id
string
name
required
Name
string
updated_at
Any of:
string format: date-time
workbook_id
required
Workbook Id
string
Example
{
"config": {
"filters": [
{
"op": "equals"
}
],
"sort": [
{
"dir": "asc"
}
]
}
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}