Views¶
You'll find below all the available methods to interact with the views of a SeaTable table.
Global structure¶
Here is the global structure of a view object:
{
"_id": "0000",
"name": "Default View",
"type": "table",
"is_locked": false,
"rows": [],
"formula_rows": {},
"summaries": [],
"filter_conjunction": "And",
"sorts": [],
"filters": [],
"hidden_columns": [],
"groupbys": [],
"group_rows": [],
"groups": []
}
Please refer to the SeaTable API Reference for a more detailed presentation.
Get view(s)¶
get_view_by_name
Get a view of the table table_name, specified by its name view_name.
view_name exists or if no table named table_name exists) Example
list_views
Get all the views of the table named table_name.
Output Dict with a single views key containing a list of the table's views (throws an error if no table named table_name exists)
Example
Add view¶
add_view
Add a view named view_name to the table table_name.
Output Single view dict (throws an error if a view called view_name already exists or if no table named table_name exists)
Example
Rename view¶
rename_view
Rename a view in the table table_name specified by its current name view_name and its new name new_view_name. Please ensure that no view named new_view_name already exists in the table table_name.
Output Single view dict (throws an error if no view called view_name exists or if no table named table_name exists)
Example
Delete view¶
delete_view
Delete a view in the table table_name, specified by its name view_name. DO NOT try to delete the last view or you might no longer be able to access your table!
Output Dict containing a single success key with the result of the operation (throws an error if no table named table_name exists). Be careful, {'success':True} will be returned even if no view named view_name exists!
Example