{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","properties":{"data":{"$ref":"#/$defs/createViewRequest"}},"required":["data"],"additionalProperties":false,"$defs":{"createViewRequest":{"type":"object","required":["data_source_id","name","type"],"properties":{"data_source_id":{"$ref":"#/$defs/idRequest"},"name":{"type":"string","maxLength":64000},"type":{"$ref":"#/$defs/viewTypeRequest"},"database_id":{"$ref":"#/$defs/idRequest"},"view_id":{"$ref":"#/$defs/idRequest"},"filter":{"$ref":"#/$defs/viewFilterRequest"},"sorts":{"$ref":"#/$defs/viewSortsRequest"},"quick_filters":{"type":"object","additionalProperties":{"$ref":"#/$defs/quickFilterConditionRequest"},"maxProperties":100},"create_database":{"$ref":"#/$defs/createDatabaseForViewRequest"},"configuration":{"$ref":"#/$defs/viewConfigRequest"},"position":{"$ref":"#/$defs/viewPositionRequest"},"placement":{"$ref":"#/$defs/widgetPlacementRequest"}},"maxProperties":100},"idRequest":{"type":"string","maxLength":64000},"viewTypeRequest":{"type":"string","enum":["table","board","list","calendar","timeline","gallery","form","chart","map","dashboard"],"maxLength":64000},"viewFilterRequest":{"type":"object","maxProperties":100},"viewSortsRequest":{"type":"array","maxItems":100,"items":{"$ref":"#/$defs/viewSortRequest"}},"viewSortRequest":{"type":"object","maxProperties":100},"quickFilterConditionRequest":{"type":"object","maxProperties":100},"createDatabaseForViewRequest":{"type":"object","required":["parent"],"properties":{"parent":{"type":"object","required":["type","page_id"],"properties":{"type":{"type":"string","const":"page_id","maxLength":64000},"page_id":{"$ref":"#/$defs/idRequest"}},"maxProperties":100},"position":{"type":"object","required":["type","block_id"],"properties":{"type":{"type":"string","const":"after_block","maxLength":64000},"block_id":{"$ref":"#/$defs/idRequest"}},"maxProperties":100},"show_data_source_title":{"type":"boolean"}},"maxProperties":100},"viewConfigRequest":{"oneOf":[{"$ref":"#/$defs/tableViewConfigRequest"},{"$ref":"#/$defs/boardViewConfigRequest"},{"$ref":"#/$defs/calendarViewConfigRequest"},{"$ref":"#/$defs/timelineViewConfigRequest"},{"$ref":"#/$defs/galleryViewConfigRequest"},{"$ref":"#/$defs/listViewConfigRequest"},{"$ref":"#/$defs/mapViewConfigRequest"},{"$ref":"#/$defs/formViewConfigRequest"},{"$ref":"#/$defs/chartViewConfigRequest"}]},"tableViewConfigRequest":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"table","maxLength":64000},"properties":{"oneOf":[{"type":"array","maxItems":100,"items":{"$ref":"#/$defs/viewPropertyConfigRequest"}},{"type":"null"}]},"group_by":{"oneOf":[{"$ref":"#/$defs/groupByConfigRequest"},{"type":"null"}]},"subtasks":{"oneOf":[{"$ref":"#/$defs/subtaskConfigRequest"},{"type":"null"}]},"wrap_cells":{"type":"boolean"},"frozen_column_index":{"type":"integer","minimum":0},"show_vertical_lines":{"type":"boolean"}},"maxProperties":100},"viewPropertyConfigRequest":{"type":"object","required":["property_id"],"properties":{"property_id":{"type":"string","maxLength":64000},"visible":{"type":"boolean"},"width":{"type":"integer","minimum":1},"wrap":{"type":"boolean"},"status_show_as":{"type":"string","enum":["select","checkbox"],"maxLength":64000},"card_property_width_mode":{"type":"string","enum":["full_line","inline"],"maxLength":64000},"date_format":{"type":"string","enum":["full","short","month_day_year","day_month_year","year_month_day","relative"],"maxLength":64000},"time_format":{"type":"string","enum":["12_hour","24_hour","hidden"],"maxLength":64000}},"maxProperties":100},"groupByConfigRequest":{"oneOf":[{"$ref":"#/$defs/selectGroupByConfigRequest"},{"$ref":"#/$defs/statusGroupByConfigRequest"},{"$ref":"#/$defs/personGroupByConfigRequest"},{"$ref":"#/$defs/relationGroupByConfigRequest"},{"$ref":"#/$defs/dateGroupByConfigRequest"},{"$ref":"#/$defs/textGroupByConfigRequest"},{"$ref":"#/$defs/numberGroupByConfigRequest"},{"$ref":"#/$defs/checkboxGroupByConfigRequest"},{"$ref":"#/$defs/formulaGroupByConfigRequest"}]},"selectGroupByConfigRequest":{"type":"object","required":["type","property_id","sort"],"properties":{"type":{"type":"string","enum":["select","multi_select"],"maxLength":64000},"property_id":{"type":"string","maxLength":64000},"sort":{"$ref":"#/$defs/groupSortRequest"},"hide_empty_groups":{"type":"boolean"}},"maxProperties":100},"groupSortRequest":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["manual","ascending","descending"],"maxLength":64000}},"maxProperties":100},"statusGroupByConfigRequest":{"type":"object","required":["type","property_id","group_by","sort"],"properties":{"type":{"type":"string","const":"status","maxLength":64000},"property_id":{"type":"string","maxLength":64000},"group_by":{"type":"string","enum":["group","option"],"maxLength":64000},"sort":{"$ref":"#/$defs/groupSortRequest"},"hide_empty_groups":{"type":"boolean"}},"maxProperties":100},"personGroupByConfigRequest":{"type":"object","required":["type","property_id","sort"],"properties":{"type":{"type":"string","enum":["person","created_by","last_edited_by"],"maxLength":64000},"property_id":{"type":"string","maxLength":64000},"sort":{"$ref":"#/$defs/groupSortRequest"},"hide_empty_groups":{"type":"boolean"}},"maxProperties":100},"relationGroupByConfigRequest":{"type":"object","required":["type","property_id","sort"],"properties":{"type":{"type":"string","const":"relation","maxLength":64000},"property_id":{"type":"string","maxLength":64000},"sort":{"$ref":"#/$defs/groupSortRequest"},"hide_empty_groups":{"type":"boolean"}},"maxProperties":100},"dateGroupByConfigRequest":{"type":"object","required":["type","property_id","group_by","sort"],"properties":{"type":{"type":"string","enum":["date","created_time","last_edited_time"],"maxLength":64000},"property_id":{"type":"string","maxLength":64000},"group_by":{"type":"string","enum":["relative","day","week","month","year"],"maxLength":64000},"sort":{"$ref":"#/$defs/groupSortRequest"},"hide_empty_groups":{"type":"boolean"},"start_day_of_week":{"type":"number","enum":[0,1]}},"maxProperties":100},"textGroupByConfigRequest":{"type":"object","required":["type","property_id","group_by","sort"],"properties":{"type":{"type":"string","enum":["text","title","url","email","phone_number"],"maxLength":64000},"property_id":{"type":"string","maxLength":64000},"group_by":{"type":"string","enum":["exact","alphabet_prefix"],"maxLength":64000},"sort":{"$ref":"#/$defs/groupSortRequest"},"hide_empty_groups":{"type":"boolean"}},"maxProperties":100},"numberGroupByConfigRequest":{"type":"object","required":["type","property_id","sort"],"properties":{"type":{"type":"string","const":"number","maxLength":64000},"property_id":{"type":"string","maxLength":64000},"sort":{"$ref":"#/$defs/groupSortRequest"},"hide_empty_groups":{"type":"boolean"},"range_start":{"type":"integer"},"range_end":{"type":"integer"},"range_size":{"type":"integer","minimum":1}},"maxProperties":100},"checkboxGroupByConfigRequest":{"type":"object","required":["type","property_id","sort"],"properties":{"type":{"type":"string","const":"checkbox","maxLength":64000},"property_id":{"type":"string","maxLength":64000},"sort":{"$ref":"#/$defs/groupSortRequest"},"hide_empty_groups":{"type":"boolean"}},"maxProperties":100},"formulaGroupByConfigRequest":{"type":"object","required":["type","property_id","group_by"],"properties":{"type":{"type":"string","const":"formula","maxLength":64000},"property_id":{"type":"string","maxLength":64000},"group_by":{"oneOf":[{"$ref":"#/$defs/formulaDateSubGroupByRequest"},{"$ref":"#/$defs/formulaTextSubGroupByRequest"},{"$ref":"#/$defs/formulaNumberSubGroupByRequest"},{"$ref":"#/$defs/formulaCheckboxSubGroupByRequest"}]},"hide_empty_groups":{"type":"boolean"}},"maxProperties":100},"formulaDateSubGroupByRequest":{"type":"object","required":["type","group_by","sort"],"properties":{"type":{"type":"string","const":"date","maxLength":64000},"group_by":{"type":"string","enum":["relative","day","week","month","year"],"maxLength":64000},"sort":{"$ref":"#/$defs/groupSortRequest"},"start_day_of_week":{"type":"number","enum":[0,1]}},"maxProperties":100},"formulaTextSubGroupByRequest":{"type":"object","required":["type","group_by","sort"],"properties":{"type":{"type":"string","const":"text","maxLength":64000},"group_by":{"type":"string","enum":["exact","alphabet_prefix"],"maxLength":64000},"sort":{"$ref":"#/$defs/groupSortRequest"}},"maxProperties":100},"formulaNumberSubGroupByRequest":{"type":"object","required":["type","sort"],"properties":{"type":{"type":"string","const":"number","maxLength":64000},"sort":{"$ref":"#/$defs/groupSortRequest"},"range_start":{"type":"integer"},"range_end":{"type":"integer"},"range_size":{"type":"integer","minimum":1}},"maxProperties":100},"formulaCheckboxSubGroupByRequest":{"type":"object","required":["type","sort"],"properties":{"type":{"type":"string","const":"checkbox","maxLength":64000},"sort":{"$ref":"#/$defs/groupSortRequest"}},"maxProperties":100},"subtaskConfigRequest":{"type":"object","properties":{"property_id":{"type":"string","maxLength":64000},"display_mode":{"type":"string","enum":["show","hidden","flattened","disabled"],"maxLength":64000},"filter_scope":{"type":"string","enum":["parents","parents_and_subitems","subitems"],"maxLength":64000},"toggle_column_id":{"type":"string","maxLength":64000}},"maxProperties":100},"boardViewConfigRequest":{"type":"object","required":["type","group_by"],"properties":{"type":{"type":"string","const":"board","maxLength":64000},"group_by":{"$ref":"#/$defs/groupByConfigRequest"},"sub_group_by":{"oneOf":[{"$ref":"#/$defs/groupByConfigRequest"},{"type":"null"}]},"properties":{"oneOf":[{"type":"array","maxItems":100,"items":{"$ref":"#/$defs/viewPropertyConfigRequest"}},{"type":"null"}]},"cover":{"oneOf":[{"$ref":"#/$defs/coverConfigRequest"},{"type":"null"}]},"cover_size":{"oneOf":[{"type":"string","enum":["small","medium","large"],"maxLength":64000},{"type":"null"}]},"cover_aspect":{"oneOf":[{"type":"string","enum":["contain","cover"],"maxLength":64000},{"type":"null"}]},"card_layout":{"oneOf":[{"type":"string","enum":["list","compact"],"maxLength":64000},{"type":"null"}]}},"maxProperties":100},"coverConfigRequest":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["page_cover","page_content","property"],"maxLength":64000},"property_id":{"type":"string","maxLength":64000}},"maxProperties":100},"calendarViewConfigRequest":{"type":"object","required":["type","date_property_id"],"properties":{"type":{"type":"string","const":"calendar","maxLength":64000},"date_property_id":{"type":"string","maxLength":64000},"properties":{"oneOf":[{"type":"array","maxItems":100,"items":{"$ref":"#/$defs/viewPropertyConfigRequest"}},{"type":"null"}]},"view_range":{"oneOf":[{"type":"string","enum":["week","month"],"maxLength":64000},{"type":"null"}]},"show_weekends":{"oneOf":[{"type":"boolean"},{"type":"null"}]}},"maxProperties":100},"timelineViewConfigRequest":{"type":"object","required":["type","date_property_id"],"properties":{"type":{"type":"string","const":"timeline","maxLength":64000},"date_property_id":{"type":"string","maxLength":64000},"end_date_property_id":{"oneOf":[{"type":"string","maxLength":64000},{"type":"null"}]},"properties":{"oneOf":[{"type":"array","maxItems":100,"items":{"$ref":"#/$defs/viewPropertyConfigRequest"}},{"type":"null"}]},"show_table":{"oneOf":[{"type":"boolean"},{"type":"null"}]},"table_properties":{"oneOf":[{"type":"array","maxItems":100,"items":{"$ref":"#/$defs/viewPropertyConfigRequest"}},{"type":"null"}]},"preference":{"oneOf":[{"$ref":"#/$defs/timelinePreferenceRequest"},{"type":"null"}]},"arrows_by":{"oneOf":[{"$ref":"#/$defs/timelineArrowsByRequest"},{"type":"null"}]},"color_by":{"oneOf":[{"type":"boolean"},{"type":"null"}]}},"maxProperties":100},"timelinePreferenceRequest":{"type":"object","required":["zoom_level"],"properties":{"zoom_level":{"type":"string","enum":["hours","day","week","bi_week","month","quarter","year","5_years"],"maxLength":64000},"center_timestamp":{"type":"integer"}},"maxProperties":100},"timelineArrowsByRequest":{"type":"object","properties":{"property_id":{"oneOf":[{"type":"string","maxLength":64000},{"type":"null"}]}},"maxProperties":100},"galleryViewConfigRequest":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"gallery","maxLength":64000},"properties":{"oneOf":[{"type":"array","maxItems":100,"items":{"$ref":"#/$defs/viewPropertyConfigRequest"}},{"type":"null"}]},"cover":{"oneOf":[{"$ref":"#/$defs/coverConfigRequest"},{"type":"null"}]},"cover_size":{"oneOf":[{"type":"string","enum":["small","medium","large"],"maxLength":64000},{"type":"null"}]},"cover_aspect":{"oneOf":[{"type":"string","enum":["contain","cover"],"maxLength":64000},{"type":"null"}]},"card_layout":{"oneOf":[{"type":"string","enum":["list","compact"],"maxLength":64000},{"type":"null"}]}},"maxProperties":100},"listViewConfigRequest":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"list","maxLength":64000},"properties":{"oneOf":[{"type":"array","maxItems":100,"items":{"$ref":"#/$defs/viewPropertyConfigRequest"}},{"type":"null"}]}},"maxProperties":100},"mapViewConfigRequest":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"map","maxLength":64000},"height":{"oneOf":[{"type":"string","enum":["small","medium","large","extra_large"],"maxLength":64000},{"type":"null"}]},"map_by":{"oneOf":[{"type":"string","maxLength":64000},{"type":"null"}]},"properties":{"oneOf":[{"type":"array","maxItems":100,"items":{"$ref":"#/$defs/viewPropertyConfigRequest"}},{"type":"null"}]}},"maxProperties":100},"formViewConfigRequest":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"form","maxLength":64000},"is_form_closed":{"oneOf":[{"type":"boolean"},{"type":"null"}]},"anonymous_submissions":{"oneOf":[{"type":"boolean"},{"type":"null"}]},"submission_permissions":{"oneOf":[{"type":"string","enum":["none","comment_only","reader","read_and_write","editor"],"maxLength":64000},{"type":"null"}]}},"maxProperties":100},"chartViewConfigRequest":{"type":"object","required":["type","chart_type"],"properties":{"type":{"type":"string","const":"chart","maxLength":64000},"chart_type":{"type":"string","enum":["column","bar","line","donut","number"],"maxLength":64000},"x_axis":{"oneOf":[{"$ref":"#/$defs/groupByConfigRequest"},{"type":"null"}]},"y_axis":{"oneOf":[{"$ref":"#/$defs/chartAggregationRequest"},{"type":"null"}]},"x_axis_property_id":{"oneOf":[{"type":"string","maxLength":64000},{"type":"null"}]},"y_axis_property_id":{"oneOf":[{"type":"string","maxLength":64000},{"type":"null"}]},"value":{"oneOf":[{"$ref":"#/$defs/chartAggregationRequest"},{"type":"null"}]},"sort":{"oneOf":[{"type":"string","enum":["manual","x_ascending","x_descending","y_ascending","y_descending"],"maxLength":64000},{"type":"null"}]},"color_theme":{"oneOf":[{"type":"string","enum":["gray","blue","yellow","green","purple","teal","orange","pink","red","auto","colorful"],"maxLength":64000},{"type":"null"}]},"height":{"oneOf":[{"type":"string","enum":["small","medium","large","extra_large"],"maxLength":64000},{"type":"null"}]},"hide_empty_groups":{"oneOf":[{"type":"boolean"},{"type":"null"}]},"legend_position":{"oneOf":[{"type":"string","enum":["off","bottom","side"],"maxLength":64000},{"type":"null"}]},"show_data_labels":{"oneOf":[{"type":"boolean"},{"type":"null"}]},"axis_labels":{"oneOf":[{"type":"string","enum":["none","x_axis","y_axis","both"],"maxLength":64000},{"type":"null"}]},"grid_lines":{"oneOf":[{"type":"string","enum":["none","horizontal","vertical","both"],"maxLength":64000},{"type":"null"}]},"cumulative":{"oneOf":[{"type":"boolean"},{"type":"null"}]},"smooth_line":{"oneOf":[{"type":"boolean"},{"type":"null"}]},"hide_line_fill_area":{"oneOf":[{"type":"boolean"},{"type":"null"}]},"group_style":{"oneOf":[{"type":"string","enum":["normal","percent","side_by_side"],"maxLength":64000},{"type":"null"}]},"y_axis_min":{"oneOf":[{"type":"number"},{"type":"null"}]},"y_axis_max":{"oneOf":[{"type":"number"},{"type":"null"}]},"donut_labels":{"oneOf":[{"type":"string","enum":["none","value","name","name_and_value"],"maxLength":64000},{"type":"null"}]},"hide_title":{"oneOf":[{"type":"boolean"},{"type":"null"}]},"stack_by":{"oneOf":[{"$ref":"#/$defs/groupByConfigRequest"},{"type":"null"}]},"reference_lines":{"oneOf":[{"type":"array","maxItems":100,"items":{"$ref":"#/$defs/chartReferenceLineRequest"}},{"type":"null"}]},"caption":{"oneOf":[{"type":"string","maxLength":64000},{"type":"null"}]},"color_by_value":{"oneOf":[{"type":"boolean"},{"type":"null"}]}},"maxProperties":100},"chartAggregationRequest":{"type":"object","required":["aggregator"],"properties":{"aggregator":{"type":"string","enum":["count","count_values","sum","average","median","min","max","range","unique","empty","not_empty","percent_empty","percent_not_empty","checked","unchecked","percent_checked","percent_unchecked","earliest_date","latest_date","date_range"],"maxLength":64000},"property_id":{"type":"string","maxLength":64000}},"maxProperties":100},"chartReferenceLineRequest":{"type":"object","required":["value","label","color","dash_style"],"properties":{"value":{"type":"number"},"label":{"type":"string","maxLength":64000},"color":{"type":"string","enum":["gray","lightgray","brown","yellow","orange","green","blue","purple","pink","red"],"maxLength":64000},"dash_style":{"type":"string","enum":["solid","dash"],"maxLength":64000},"id":{"type":"string","maxLength":64000}},"maxProperties":100},"viewPositionRequest":{"oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"start","maxLength":64000}},"maxProperties":100},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"end","maxLength":64000}},"maxProperties":100},{"type":"object","required":["type","view_id"],"properties":{"type":{"type":"string","const":"after_view","maxLength":64000},"view_id":{"$ref":"#/$defs/idRequest"}},"maxProperties":100}]},"widgetPlacementRequest":{"oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"new_row","maxLength":64000},"row_index":{"type":"integer","minimum":0}},"maxProperties":100},{"type":"object","required":["type","row_index"],"properties":{"type":{"type":"string","const":"existing_row","maxLength":64000},"row_index":{"type":"integer","minimum":0}},"maxProperties":100}]}}},"name":"Create a view","id":"notion.api.create-view","example":{"data":{"data_source_id":"fixture","name":"fixture","type":"table"}},"maxRequests":1,"summary":false}}