> For the complete documentation index, see [llms.txt](https://docs.ninox.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ninox.com/ninox-api/api-reference/api-endpoints/views.md).

# Views

## List all views in a table

> Retrieves all views for a table

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"API Key","description":"Enter your Workspace API key. \n\n API keys can be generated and managed within the **Workspace Integration** settings in the Ninox app.","in":"header","name":"Authorization","type":"http"}},"schemas":{"ViewsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"annualRecurring":{"description":"Calendar views only: render every record on the same day/month every year","type":"boolean"},"chartConfig":{"description":"Chart configuration (chart type, axes, datasets), for Chart views","type":"object","properties":{"chartType":{"type":"string","enum":["bar","line","pie","funnel","ranking","board"]},"dataSets":{"type":"array","items":{"type":"object","properties":{"aggregation":{"type":"string","enum":["average","count","max","median","min","none","sum"]},"color":{"description":"Series color (hex string)","type":"string"},"fieldName":{"description":"Field name this series reads from","type":"string"},"labels":{"description":"Series labels (localized)","type":"object","additionalProperties":{"type":"string"}}}}},"donut":{"type":"boolean"},"labelPosition":{"type":"string","enum":["bottom","center","inside","outside","top"]},"legend":{"type":"object","properties":{"show":{"type":"boolean"}}},"limit":{"description":"ranking only: how many categories it shows","type":"integer","minimum":1,"maximum":20},"orientation":{"type":"string","enum":["horizontal","vertical"]},"showDataTable":{"type":"boolean"},"showLabels":{"type":"boolean"},"showPoints":{"type":"boolean"},"showTitle":{"type":"boolean"},"smooth":{"type":"boolean"},"stacked":{"type":"boolean"},"style":{"type":"string","enum":["default","half_donut","pad_angle","rounded_corner"]},"tooltips":{"type":"object","properties":{"show":{"type":"boolean"}}},"xAxis":{"type":"object","properties":{"fieldName":{"description":"X-axis field name, null removes it","type":["string","null"]},"groupBy":{"type":"string","enum":["daily","monthly","none","quarterly","weekly","yearly"]},"show":{"type":"boolean"}}},"yAxis":{"type":"object","properties":{"show":{"type":"boolean"}}}},"required":["chartType","dataSets","xAxis"]},"columns":{"type":"array","items":{"type":"object","properties":{"agg":{"description":"Aggregation function applied to the column","type":"string"},"conditionalStyling":{"description":"Legacy per-column conditional styling rules","type":"array","items":{"type":"object","properties":{"background":{"description":"Background color (hex string)","type":"string"},"cell":{"description":"Target cell","type":"string"},"color":{"description":"Icon color (hex string)","type":"string"},"icon":{"description":"Icon name","type":"string"},"operand":{"type":"string","description":"Comparator"},"value":{"type":"string","description":"Value compared against"}},"required":["operand","value"]}},"field":{"type":"string","description":"Field name, or a script expression for a calculated column"},"hidden":{"description":"Column retained but hidden from the grid","type":"boolean"},"id":{"description":"Stable identity of a calculated column; send it back unchanged when updating the view","type":"string"},"labels":{"description":"Column labels (localized)","type":"object","additionalProperties":{"type":"string"}},"order":{"type":"number","description":"Column display order"},"role":{"description":"Column role (e.g. title, date, image, location, color)","type":"string"},"width":{"description":"Column width","type":"number"}},"required":["field","order"]},"description":"View columns"},"conditionalFormatting":{"description":"Conditional formatting rules","type":"array","items":{"type":"object","properties":{"backgroundColor":{"description":"Background color (hex string)","type":"string"},"bold":{"description":"Bold text","type":"boolean"},"comparator":{"type":"string","enum":["contains","does_not_contain","ends_with","gt","gte","is","is_empty","is_not","is_not_empty","logic","lt","lte","starts_with"],"description":"Comparator"},"expression":{"description":"Script expression, used only when comparator is 'logic'","type":"string"},"fieldName":{"type":"string","description":"Target field name"},"highlightColor":{"description":"Highlight color (hex string)","type":"string"},"icon":{"description":"Icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"id":{"type":"string","description":"Stable rule id"},"italic":{"description":"Italic text","type":"boolean"},"order":{"type":"number","description":"Rule evaluation order"},"strikethrough":{"description":"Strikethrough text","type":"boolean"},"target":{"type":"string","enum":["cell","row"],"description":"Whether the rule styles a single cell or the whole row"},"textColor":{"description":"Text color (hex string)","type":"string"},"value":{"description":"Value compared against"}},"required":["comparator","fieldName","id","order","target"]}},"filter":{"description":"Stored filter conditions","type":"array","items":{"type":"object","properties":{"field":{"description":"Field name","type":"string"},"id":{"type":"string","description":"Stable condition id"},"operator":{"description":"Filter operator","type":"string"},"value":{"description":"Value compared against","type":"string"}},"required":["id"]}},"ganttConfig":{"description":"Which fields the bars/milestones/dependencies are read from, for Gantt views","type":"object","properties":{"baselineEndFieldName":{"description":"Planned end field, rendered as a ghost bar","type":["string","null"]},"baselineStartFieldName":{"description":"Planned start field, rendered as a ghost bar","type":["string","null"]},"dependencyDirection":{"type":"string","enum":["predecessor","successor"]},"dependencyFieldName":{"description":"A reference field pointing back at this table","type":["string","null"]},"disableDragAndDrop":{"type":"boolean"},"endFieldName":{"type":["string","null"]},"hideTitleColumn":{"type":"boolean"},"hideWeekends":{"type":"boolean"},"milestoneFieldName":{"type":["string","null"]},"progressFieldName":{"type":["string","null"]},"showCriticalPath":{"type":"boolean"},"showWeekends":{"type":"boolean"},"startFieldName":{"type":["string","null"]},"timeScale":{"type":"string","enum":["day","month","quarter","week"]},"titleColumnFieldName":{"type":["string","null"]},"titleColumnWidth":{"type":"number"}}},"groupBy":{"description":"Grouping configuration","type":"array","items":{"type":"object","properties":{"direction":{"description":"Group order direction, defaults to ascending","type":"string","enum":["asc","desc"]},"fieldName":{"type":"string","description":"Field name"}},"required":["fieldName"]}},"icon":{"description":"View icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"id":{"type":"string","description":"View id"},"labels":{"description":"View labels (localized)","type":"object","additionalProperties":{"type":"string"}},"moduleName":{"type":"string","description":"Module name"},"name":{"type":"string","description":"View name"},"order":{"type":"number","description":"View display order"},"pivot":{"description":"Pivot configuration (row/column/value axes), for Pivot views","type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"dateGrouping":{"description":"Date bucket, for date fields","type":"string","enum":["day","month","quarter","week","year"]},"fieldName":{"type":"string","description":"Field name"},"sort":{"type":"string","enum":["asc","desc"]}},"required":["fieldName"]},"description":"Column axis fields"},"columnWidths":{"description":"Column widths set in the pivot","type":"object","properties":{"rowHeader":{"description":"Row header width in px","type":"number"},"values":{"description":"Value column widths in px, keyed by `<fieldName>-<agg>`","type":"object","additionalProperties":{"type":"number"}}}},"rows":{"type":"array","items":{"type":"object","properties":{"dateGrouping":{"description":"Date bucket, for date fields","type":"string","enum":["day","month","quarter","week","year"]},"fieldName":{"type":"string","description":"Field name"},"sort":{"type":"string","enum":["asc","desc"]}},"required":["fieldName"]},"description":"Row axis fields"},"values":{"type":"array","items":{"type":"object","properties":{"agg":{"type":"string","enum":["avg","count","max","min","sum","unique"],"description":"Aggregation"},"fieldName":{"type":"string","description":"Field name"}},"required":["agg","fieldName"]},"description":"Aggregated value fields"}},"required":["columns","rows","values"]},"search":{"description":"Stored search term","type":"string"},"sort":{"description":"Sort configuration","type":"object","properties":{"direction":{"type":"string","enum":["asc","desc"],"description":"Sort direction"},"fieldName":{"type":"string","description":"Field name"}},"required":["direction","fieldName"]},"tableName":{"type":"string","description":"Table name"},"type":{"type":"string","enum":["Calendar","Chart","Gallery","Gantt","Kanban","List","Maps","Pivot","Table"],"description":"View type"}},"required":["columns","id","moduleName","name","order","tableName","type"]},"description":"List of views"}},"required":["data"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}},"required":["error"]}}},"paths":{"/api/v1/workspace/{workspaceId}/modules/{moduleName}/tables/{tableName}/views":{"get":{"operationId":"ViewsV1Controller_getViews","summary":"List all views in a table","description":"Retrieves all views for a table","parameters":[{"name":"moduleName","required":true,"in":"path","description":"Module name","schema":{"minLength":1,"maxLength":100,"pattern":"^[a-z0-9_]+$","type":"string"}},{"name":"tableName","required":true,"in":"path","description":"Table name","schema":{"minLength":1,"maxLength":100,"pattern":"^[a-z0-9_]+$","type":"string"}},{"name":"workspaceId","required":true,"in":"path","description":"Workspace ID","schema":{"minLength":12,"maxLength":12,"pattern":"^[a-z0-9]+$","type":"string"}}],"responses":{"200":{"description":"Views retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViewsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Table not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Views"]}}}}
```

## Create a view

> Creates a view in a table. Every view type can be created, with field references by name.

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"API Key","description":"Enter your Workspace API key. \n\n API keys can be generated and managed within the **Workspace Integration** settings in the Ninox app.","in":"header","name":"Authorization","type":"http"}},"schemas":{"CreateViewBody":{"type":"object","properties":{"annualRecurring":{"description":"Calendar views only: render every record on the same day/month every year","type":"boolean"},"chartConfig":{"description":"Chart views: chart type, axes and data series","type":"object","properties":{"chartType":{"type":"string","enum":["bar","line","pie","funnel","ranking","board"]},"dataSets":{"type":"array","items":{"type":"object","properties":{"aggregation":{"type":"string","enum":["average","count","max","median","min","none","sum"]},"color":{"description":"Series color (hex string)","type":"string"},"fieldName":{"description":"Field name this series reads from","type":"string"},"labels":{"description":"Series labels (localized)","type":"object","additionalProperties":{"type":"string"}}}}},"donut":{"type":"boolean"},"labelPosition":{"type":"string","enum":["bottom","center","inside","outside","top"]},"legend":{"type":"object","properties":{"show":{"type":"boolean"}}},"limit":{"description":"ranking only: how many categories it shows","type":"integer","minimum":1,"maximum":20},"orientation":{"type":"string","enum":["horizontal","vertical"]},"showDataTable":{"type":"boolean"},"showLabels":{"type":"boolean"},"showPoints":{"type":"boolean"},"showTitle":{"type":"boolean"},"smooth":{"type":"boolean"},"stacked":{"type":"boolean"},"style":{"type":"string","enum":["default","half_donut","pad_angle","rounded_corner"]},"tooltips":{"type":"object","properties":{"show":{"type":"boolean"}}},"xAxis":{"type":"object","properties":{"fieldName":{"description":"X-axis field name, null removes it","type":["string","null"]},"groupBy":{"type":"string","enum":["daily","monthly","none","quarterly","weekly","yearly"]},"show":{"type":"boolean"}}},"yAxis":{"type":"object","properties":{"show":{"type":"boolean"}}}}},"columns":{"minItems":1,"type":"array","items":{"type":"object","properties":{"agg":{"description":"Aggregation function applied to the column","type":"string"},"conditionalStyling":{"description":"Legacy per-column conditional styling rules","type":"array","items":{"type":"object","properties":{"background":{"description":"Background color (hex string)","type":"string"},"cell":{"description":"Target cell","type":"string"},"color":{"description":"Icon color (hex string)","type":"string"},"icon":{"description":"Icon name","type":"string"},"operand":{"type":"string","description":"Comparator"},"value":{"type":"string","description":"Value compared against"}},"required":["operand","value"]}},"field":{"type":"string","description":"Field name, or a script expression for a calculated column"},"hidden":{"description":"Column retained but hidden from the grid","type":"boolean"},"id":{"description":"Stable identity of a calculated column; send it back unchanged when updating the view","type":"string"},"labels":{"description":"Column labels (localized)","type":"object","additionalProperties":{"type":"string"}},"order":{"type":"number","description":"Column display order"},"role":{"description":"Column role (e.g. title, date, image, location, color)","type":"string"},"width":{"description":"Column width","type":"number"}},"required":["field","order"]},"description":"View columns"},"conditionalFormatting":{"description":"Conditional formatting rules","type":"array","items":{"type":"object","properties":{"backgroundColor":{"description":"Background color (hex string)","type":"string"},"bold":{"description":"Bold text","type":"boolean"},"comparator":{"type":"string","enum":["contains","does_not_contain","ends_with","gt","gte","is","is_empty","is_not","is_not_empty","logic","lt","lte","starts_with"],"description":"Comparator"},"expression":{"description":"Script expression, used only when comparator is 'logic'","type":"string"},"fieldName":{"type":"string","description":"Target field name"},"highlightColor":{"description":"Highlight color (hex string)","type":"string"},"icon":{"description":"Icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"id":{"type":"string","description":"Stable rule id"},"italic":{"description":"Italic text","type":"boolean"},"order":{"type":"number","description":"Rule evaluation order"},"strikethrough":{"description":"Strikethrough text","type":"boolean"},"target":{"type":"string","enum":["cell","row"],"description":"Whether the rule styles a single cell or the whole row"},"textColor":{"description":"Text color (hex string)","type":"string"},"value":{"description":"Value compared against"}},"required":["comparator","fieldName","id","order","target"]}},"filter":{"description":"Stored filter conditions","type":"array","items":{"type":"object","properties":{"field":{"description":"Field name","type":"string"},"id":{"type":"string","description":"Stable condition id"},"operator":{"description":"Filter operator","type":"string"},"value":{"description":"Value compared against","type":"string"}},"required":["id"]}},"ganttConfig":{"description":"Gantt views: which fields the bars are read from","type":"object","properties":{"baselineEndFieldName":{"description":"Planned end field, rendered as a ghost bar","type":["string","null"]},"baselineStartFieldName":{"description":"Planned start field, rendered as a ghost bar","type":["string","null"]},"dependencyDirection":{"type":"string","enum":["predecessor","successor"]},"dependencyFieldName":{"description":"A reference field pointing back at this table","type":["string","null"]},"disableDragAndDrop":{"type":"boolean"},"endFieldName":{"type":["string","null"]},"hideTitleColumn":{"type":"boolean"},"hideWeekends":{"type":"boolean"},"milestoneFieldName":{"type":["string","null"]},"progressFieldName":{"type":["string","null"]},"showCriticalPath":{"type":"boolean"},"showWeekends":{"type":"boolean"},"startFieldName":{"type":["string","null"]},"timeScale":{"type":"string","enum":["day","month","quarter","week"]},"titleColumnFieldName":{"type":["string","null"]},"titleColumnWidth":{"type":"number"}}},"groupBy":{"description":"Grouping configuration","type":"array","items":{"type":"object","properties":{"direction":{"description":"Group order direction, defaults to ascending","type":"string","enum":["asc","desc"]},"fieldName":{"type":"string","description":"Field name"}},"required":["fieldName"]}},"icon":{"description":"View icon","type":"object","properties":{"color":{"type":"string"},"filling":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","minLength":1}}},"labels":{"description":"View labels (localized)","type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":100}},"name":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9_]+$","description":"View name"},"pivot":{"description":"Pivot views: row, column and value axes","type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"dateGrouping":{"description":"Date bucket, for date fields","type":"string","enum":["day","month","quarter","week","year"]},"fieldName":{"type":"string","description":"Field name"},"sort":{"type":"string","enum":["asc","desc"]}},"required":["fieldName"]},"description":"Column axis fields"},"columnWidths":{"description":"Column widths set in the pivot","type":"object","properties":{"rowHeader":{"description":"Row header width in px","type":"number"},"values":{"description":"Value column widths in px, keyed by `<fieldName>-<agg>`","type":"object","additionalProperties":{"type":"number"}}}},"rows":{"type":"array","items":{"type":"object","properties":{"dateGrouping":{"description":"Date bucket, for date fields","type":"string","enum":["day","month","quarter","week","year"]},"fieldName":{"type":"string","description":"Field name"},"sort":{"type":"string","enum":["asc","desc"]}},"required":["fieldName"]},"description":"Row axis fields"},"values":{"type":"array","items":{"type":"object","properties":{"agg":{"type":"string","enum":["avg","count","max","min","sum","unique"],"description":"Aggregation"},"fieldName":{"type":"string","description":"Field name"}},"required":["agg","fieldName"]},"description":"Aggregated value fields"}}},"search":{"description":"Stored search term","type":"string"},"sort":{"description":"Sort configuration","type":"object","properties":{"direction":{"type":"string","enum":["asc","desc"],"description":"Sort direction"},"fieldName":{"type":"string","description":"Field name"}}},"type":{"type":"string","enum":["Calendar","Chart","Gallery","Gantt","Kanban","List","Maps","Pivot","Table"],"description":"View type"}},"required":["columns","name","type"],"additionalProperties":false},"ViewResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"annualRecurring":{"description":"Calendar views only: render every record on the same day/month every year","type":"boolean"},"chartConfig":{"description":"Chart configuration (chart type, axes, datasets), for Chart views","type":"object","properties":{"chartType":{"type":"string","enum":["bar","line","pie","funnel","ranking","board"]},"dataSets":{"type":"array","items":{"type":"object","properties":{"aggregation":{"type":"string","enum":["average","count","max","median","min","none","sum"]},"color":{"description":"Series color (hex string)","type":"string"},"fieldName":{"description":"Field name this series reads from","type":"string"},"labels":{"description":"Series labels (localized)","type":"object","additionalProperties":{"type":"string"}}}}},"donut":{"type":"boolean"},"labelPosition":{"type":"string","enum":["bottom","center","inside","outside","top"]},"legend":{"type":"object","properties":{"show":{"type":"boolean"}}},"limit":{"description":"ranking only: how many categories it shows","type":"integer","minimum":1,"maximum":20},"orientation":{"type":"string","enum":["horizontal","vertical"]},"showDataTable":{"type":"boolean"},"showLabels":{"type":"boolean"},"showPoints":{"type":"boolean"},"showTitle":{"type":"boolean"},"smooth":{"type":"boolean"},"stacked":{"type":"boolean"},"style":{"type":"string","enum":["default","half_donut","pad_angle","rounded_corner"]},"tooltips":{"type":"object","properties":{"show":{"type":"boolean"}}},"xAxis":{"type":"object","properties":{"fieldName":{"description":"X-axis field name, null removes it","type":["string","null"]},"groupBy":{"type":"string","enum":["daily","monthly","none","quarterly","weekly","yearly"]},"show":{"type":"boolean"}}},"yAxis":{"type":"object","properties":{"show":{"type":"boolean"}}}},"required":["chartType","dataSets","xAxis"]},"columns":{"type":"array","items":{"type":"object","properties":{"agg":{"description":"Aggregation function applied to the column","type":"string"},"conditionalStyling":{"description":"Legacy per-column conditional styling rules","type":"array","items":{"type":"object","properties":{"background":{"description":"Background color (hex string)","type":"string"},"cell":{"description":"Target cell","type":"string"},"color":{"description":"Icon color (hex string)","type":"string"},"icon":{"description":"Icon name","type":"string"},"operand":{"type":"string","description":"Comparator"},"value":{"type":"string","description":"Value compared against"}},"required":["operand","value"]}},"field":{"type":"string","description":"Field name, or a script expression for a calculated column"},"hidden":{"description":"Column retained but hidden from the grid","type":"boolean"},"id":{"description":"Stable identity of a calculated column; send it back unchanged when updating the view","type":"string"},"labels":{"description":"Column labels (localized)","type":"object","additionalProperties":{"type":"string"}},"order":{"type":"number","description":"Column display order"},"role":{"description":"Column role (e.g. title, date, image, location, color)","type":"string"},"width":{"description":"Column width","type":"number"}},"required":["field","order"]},"description":"View columns"},"conditionalFormatting":{"description":"Conditional formatting rules","type":"array","items":{"type":"object","properties":{"backgroundColor":{"description":"Background color (hex string)","type":"string"},"bold":{"description":"Bold text","type":"boolean"},"comparator":{"type":"string","enum":["contains","does_not_contain","ends_with","gt","gte","is","is_empty","is_not","is_not_empty","logic","lt","lte","starts_with"],"description":"Comparator"},"expression":{"description":"Script expression, used only when comparator is 'logic'","type":"string"},"fieldName":{"type":"string","description":"Target field name"},"highlightColor":{"description":"Highlight color (hex string)","type":"string"},"icon":{"description":"Icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"id":{"type":"string","description":"Stable rule id"},"italic":{"description":"Italic text","type":"boolean"},"order":{"type":"number","description":"Rule evaluation order"},"strikethrough":{"description":"Strikethrough text","type":"boolean"},"target":{"type":"string","enum":["cell","row"],"description":"Whether the rule styles a single cell or the whole row"},"textColor":{"description":"Text color (hex string)","type":"string"},"value":{"description":"Value compared against"}},"required":["comparator","fieldName","id","order","target"]}},"filter":{"description":"Stored filter conditions","type":"array","items":{"type":"object","properties":{"field":{"description":"Field name","type":"string"},"id":{"type":"string","description":"Stable condition id"},"operator":{"description":"Filter operator","type":"string"},"value":{"description":"Value compared against","type":"string"}},"required":["id"]}},"ganttConfig":{"description":"Which fields the bars/milestones/dependencies are read from, for Gantt views","type":"object","properties":{"baselineEndFieldName":{"description":"Planned end field, rendered as a ghost bar","type":["string","null"]},"baselineStartFieldName":{"description":"Planned start field, rendered as a ghost bar","type":["string","null"]},"dependencyDirection":{"type":"string","enum":["predecessor","successor"]},"dependencyFieldName":{"description":"A reference field pointing back at this table","type":["string","null"]},"disableDragAndDrop":{"type":"boolean"},"endFieldName":{"type":["string","null"]},"hideTitleColumn":{"type":"boolean"},"hideWeekends":{"type":"boolean"},"milestoneFieldName":{"type":["string","null"]},"progressFieldName":{"type":["string","null"]},"showCriticalPath":{"type":"boolean"},"showWeekends":{"type":"boolean"},"startFieldName":{"type":["string","null"]},"timeScale":{"type":"string","enum":["day","month","quarter","week"]},"titleColumnFieldName":{"type":["string","null"]},"titleColumnWidth":{"type":"number"}}},"groupBy":{"description":"Grouping configuration","type":"array","items":{"type":"object","properties":{"direction":{"description":"Group order direction, defaults to ascending","type":"string","enum":["asc","desc"]},"fieldName":{"type":"string","description":"Field name"}},"required":["fieldName"]}},"icon":{"description":"View icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"id":{"type":"string","description":"View id"},"labels":{"description":"View labels (localized)","type":"object","additionalProperties":{"type":"string"}},"moduleName":{"type":"string","description":"Module name"},"name":{"type":"string","description":"View name"},"order":{"type":"number","description":"View display order"},"pivot":{"description":"Pivot configuration (row/column/value axes), for Pivot views","type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"dateGrouping":{"description":"Date bucket, for date fields","type":"string","enum":["day","month","quarter","week","year"]},"fieldName":{"type":"string","description":"Field name"},"sort":{"type":"string","enum":["asc","desc"]}},"required":["fieldName"]},"description":"Column axis fields"},"columnWidths":{"description":"Column widths set in the pivot","type":"object","properties":{"rowHeader":{"description":"Row header width in px","type":"number"},"values":{"description":"Value column widths in px, keyed by `<fieldName>-<agg>`","type":"object","additionalProperties":{"type":"number"}}}},"rows":{"type":"array","items":{"type":"object","properties":{"dateGrouping":{"description":"Date bucket, for date fields","type":"string","enum":["day","month","quarter","week","year"]},"fieldName":{"type":"string","description":"Field name"},"sort":{"type":"string","enum":["asc","desc"]}},"required":["fieldName"]},"description":"Row axis fields"},"values":{"type":"array","items":{"type":"object","properties":{"agg":{"type":"string","enum":["avg","count","max","min","sum","unique"],"description":"Aggregation"},"fieldName":{"type":"string","description":"Field name"}},"required":["agg","fieldName"]},"description":"Aggregated value fields"}},"required":["columns","rows","values"]},"search":{"description":"Stored search term","type":"string"},"sort":{"description":"Sort configuration","type":"object","properties":{"direction":{"type":"string","enum":["asc","desc"],"description":"Sort direction"},"fieldName":{"type":"string","description":"Field name"}},"required":["direction","fieldName"]},"tableName":{"type":"string","description":"Table name"},"type":{"type":"string","enum":["Calendar","Chart","Gallery","Gantt","Kanban","List","Maps","Pivot","Table"],"description":"View type"}},"description":"View details"}},"required":["data"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}},"required":["error"]}}},"paths":{"/api/v1/workspace/{workspaceId}/modules/{moduleName}/tables/{tableName}/views":{"post":{"operationId":"ViewsV1Controller_createView","summary":"Create a view","description":"Creates a view in a table. Every view type can be created, with field references by name.","parameters":[{"name":"moduleName","required":true,"in":"path","description":"Module name","schema":{"minLength":1,"maxLength":100,"pattern":"^[a-z0-9_]+$","type":"string"}},{"name":"tableName","required":true,"in":"path","description":"Table name","schema":{"minLength":1,"maxLength":100,"pattern":"^[a-z0-9_]+$","type":"string"}},{"name":"workspaceId","required":true,"in":"path","description":"Workspace ID","schema":{"minLength":12,"maxLength":12,"pattern":"^[a-z0-9]+$","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateViewBody"}}}},"responses":{"201":{"description":"View created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViewResponse"}}}},"400":{"description":"Bad request (e.g., unsupported view type)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Workspace, module or table not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Views"]}}}}
```

## Get a specific view

> Retrieves a specific view by id

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"API Key","description":"Enter your Workspace API key. \n\n API keys can be generated and managed within the **Workspace Integration** settings in the Ninox app.","in":"header","name":"Authorization","type":"http"}},"schemas":{"ViewResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"annualRecurring":{"description":"Calendar views only: render every record on the same day/month every year","type":"boolean"},"chartConfig":{"description":"Chart configuration (chart type, axes, datasets), for Chart views","type":"object","properties":{"chartType":{"type":"string","enum":["bar","line","pie","funnel","ranking","board"]},"dataSets":{"type":"array","items":{"type":"object","properties":{"aggregation":{"type":"string","enum":["average","count","max","median","min","none","sum"]},"color":{"description":"Series color (hex string)","type":"string"},"fieldName":{"description":"Field name this series reads from","type":"string"},"labels":{"description":"Series labels (localized)","type":"object","additionalProperties":{"type":"string"}}}}},"donut":{"type":"boolean"},"labelPosition":{"type":"string","enum":["bottom","center","inside","outside","top"]},"legend":{"type":"object","properties":{"show":{"type":"boolean"}}},"limit":{"description":"ranking only: how many categories it shows","type":"integer","minimum":1,"maximum":20},"orientation":{"type":"string","enum":["horizontal","vertical"]},"showDataTable":{"type":"boolean"},"showLabels":{"type":"boolean"},"showPoints":{"type":"boolean"},"showTitle":{"type":"boolean"},"smooth":{"type":"boolean"},"stacked":{"type":"boolean"},"style":{"type":"string","enum":["default","half_donut","pad_angle","rounded_corner"]},"tooltips":{"type":"object","properties":{"show":{"type":"boolean"}}},"xAxis":{"type":"object","properties":{"fieldName":{"description":"X-axis field name, null removes it","type":["string","null"]},"groupBy":{"type":"string","enum":["daily","monthly","none","quarterly","weekly","yearly"]},"show":{"type":"boolean"}}},"yAxis":{"type":"object","properties":{"show":{"type":"boolean"}}}},"required":["chartType","dataSets","xAxis"]},"columns":{"type":"array","items":{"type":"object","properties":{"agg":{"description":"Aggregation function applied to the column","type":"string"},"conditionalStyling":{"description":"Legacy per-column conditional styling rules","type":"array","items":{"type":"object","properties":{"background":{"description":"Background color (hex string)","type":"string"},"cell":{"description":"Target cell","type":"string"},"color":{"description":"Icon color (hex string)","type":"string"},"icon":{"description":"Icon name","type":"string"},"operand":{"type":"string","description":"Comparator"},"value":{"type":"string","description":"Value compared against"}},"required":["operand","value"]}},"field":{"type":"string","description":"Field name, or a script expression for a calculated column"},"hidden":{"description":"Column retained but hidden from the grid","type":"boolean"},"id":{"description":"Stable identity of a calculated column; send it back unchanged when updating the view","type":"string"},"labels":{"description":"Column labels (localized)","type":"object","additionalProperties":{"type":"string"}},"order":{"type":"number","description":"Column display order"},"role":{"description":"Column role (e.g. title, date, image, location, color)","type":"string"},"width":{"description":"Column width","type":"number"}},"required":["field","order"]},"description":"View columns"},"conditionalFormatting":{"description":"Conditional formatting rules","type":"array","items":{"type":"object","properties":{"backgroundColor":{"description":"Background color (hex string)","type":"string"},"bold":{"description":"Bold text","type":"boolean"},"comparator":{"type":"string","enum":["contains","does_not_contain","ends_with","gt","gte","is","is_empty","is_not","is_not_empty","logic","lt","lte","starts_with"],"description":"Comparator"},"expression":{"description":"Script expression, used only when comparator is 'logic'","type":"string"},"fieldName":{"type":"string","description":"Target field name"},"highlightColor":{"description":"Highlight color (hex string)","type":"string"},"icon":{"description":"Icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"id":{"type":"string","description":"Stable rule id"},"italic":{"description":"Italic text","type":"boolean"},"order":{"type":"number","description":"Rule evaluation order"},"strikethrough":{"description":"Strikethrough text","type":"boolean"},"target":{"type":"string","enum":["cell","row"],"description":"Whether the rule styles a single cell or the whole row"},"textColor":{"description":"Text color (hex string)","type":"string"},"value":{"description":"Value compared against"}},"required":["comparator","fieldName","id","order","target"]}},"filter":{"description":"Stored filter conditions","type":"array","items":{"type":"object","properties":{"field":{"description":"Field name","type":"string"},"id":{"type":"string","description":"Stable condition id"},"operator":{"description":"Filter operator","type":"string"},"value":{"description":"Value compared against","type":"string"}},"required":["id"]}},"ganttConfig":{"description":"Which fields the bars/milestones/dependencies are read from, for Gantt views","type":"object","properties":{"baselineEndFieldName":{"description":"Planned end field, rendered as a ghost bar","type":["string","null"]},"baselineStartFieldName":{"description":"Planned start field, rendered as a ghost bar","type":["string","null"]},"dependencyDirection":{"type":"string","enum":["predecessor","successor"]},"dependencyFieldName":{"description":"A reference field pointing back at this table","type":["string","null"]},"disableDragAndDrop":{"type":"boolean"},"endFieldName":{"type":["string","null"]},"hideTitleColumn":{"type":"boolean"},"hideWeekends":{"type":"boolean"},"milestoneFieldName":{"type":["string","null"]},"progressFieldName":{"type":["string","null"]},"showCriticalPath":{"type":"boolean"},"showWeekends":{"type":"boolean"},"startFieldName":{"type":["string","null"]},"timeScale":{"type":"string","enum":["day","month","quarter","week"]},"titleColumnFieldName":{"type":["string","null"]},"titleColumnWidth":{"type":"number"}}},"groupBy":{"description":"Grouping configuration","type":"array","items":{"type":"object","properties":{"direction":{"description":"Group order direction, defaults to ascending","type":"string","enum":["asc","desc"]},"fieldName":{"type":"string","description":"Field name"}},"required":["fieldName"]}},"icon":{"description":"View icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"id":{"type":"string","description":"View id"},"labels":{"description":"View labels (localized)","type":"object","additionalProperties":{"type":"string"}},"moduleName":{"type":"string","description":"Module name"},"name":{"type":"string","description":"View name"},"order":{"type":"number","description":"View display order"},"pivot":{"description":"Pivot configuration (row/column/value axes), for Pivot views","type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"dateGrouping":{"description":"Date bucket, for date fields","type":"string","enum":["day","month","quarter","week","year"]},"fieldName":{"type":"string","description":"Field name"},"sort":{"type":"string","enum":["asc","desc"]}},"required":["fieldName"]},"description":"Column axis fields"},"columnWidths":{"description":"Column widths set in the pivot","type":"object","properties":{"rowHeader":{"description":"Row header width in px","type":"number"},"values":{"description":"Value column widths in px, keyed by `<fieldName>-<agg>`","type":"object","additionalProperties":{"type":"number"}}}},"rows":{"type":"array","items":{"type":"object","properties":{"dateGrouping":{"description":"Date bucket, for date fields","type":"string","enum":["day","month","quarter","week","year"]},"fieldName":{"type":"string","description":"Field name"},"sort":{"type":"string","enum":["asc","desc"]}},"required":["fieldName"]},"description":"Row axis fields"},"values":{"type":"array","items":{"type":"object","properties":{"agg":{"type":"string","enum":["avg","count","max","min","sum","unique"],"description":"Aggregation"},"fieldName":{"type":"string","description":"Field name"}},"required":["agg","fieldName"]},"description":"Aggregated value fields"}},"required":["columns","rows","values"]},"search":{"description":"Stored search term","type":"string"},"sort":{"description":"Sort configuration","type":"object","properties":{"direction":{"type":"string","enum":["asc","desc"],"description":"Sort direction"},"fieldName":{"type":"string","description":"Field name"}},"required":["direction","fieldName"]},"tableName":{"type":"string","description":"Table name"},"type":{"type":"string","enum":["Calendar","Chart","Gallery","Gantt","Kanban","List","Maps","Pivot","Table"],"description":"View type"}},"description":"View details"}},"required":["data"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}},"required":["error"]}}},"paths":{"/api/v1/workspace/{workspaceId}/views/{viewId}":{"get":{"operationId":"ViewsV1Controller_getView","summary":"Get a specific view","description":"Retrieves a specific view by id","parameters":[{"name":"viewId","required":true,"in":"path","description":"View ID","schema":{"minLength":12,"maxLength":12,"pattern":"^[a-z0-9]+$","type":"string"}},{"name":"workspaceId","required":true,"in":"path","description":"Workspace ID","schema":{"minLength":12,"maxLength":12,"pattern":"^[a-z0-9]+$","type":"string"}}],"responses":{"200":{"description":"View details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViewResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"View not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Views"]}}}}
```

## Delete a view

> Deletes a view

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"API Key","description":"Enter your Workspace API key. \n\n API keys can be generated and managed within the **Workspace Integration** settings in the Ninox app.","in":"header","name":"Authorization","type":"http"}},"schemas":{"DeleteViewResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Deleted view id"}}}},"required":["data"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}},"required":["error"]}}},"paths":{"/api/v1/workspace/{workspaceId}/views/{viewId}":{"delete":{"operationId":"ViewsV1Controller_deleteView","summary":"Delete a view","description":"Deletes a view","parameters":[{"name":"viewId","required":true,"in":"path","description":"View ID","schema":{"minLength":12,"maxLength":12,"pattern":"^[a-z0-9]+$","type":"string"}},{"name":"workspaceId","required":true,"in":"path","description":"Workspace ID","schema":{"minLength":12,"maxLength":12,"pattern":"^[a-z0-9]+$","type":"string"}}],"responses":{"200":{"description":"View deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteViewResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"View not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Views"]}}}}
```

## Update a view

> Updates a view. Nested configs (chartConfig, ganttConfig, pivot) are merged onto the stored ones, so a PATCH can send just the settings it changes.

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"API Key","description":"Enter your Workspace API key. \n\n API keys can be generated and managed within the **Workspace Integration** settings in the Ninox app.","in":"header","name":"Authorization","type":"http"}},"schemas":{"UpdateViewBody":{"type":"object","properties":{"annualRecurring":{"description":"Calendar views only: render every record on the same day/month every year","type":"boolean"},"chartConfig":{"type":"object","properties":{"chartType":{"type":"string","enum":["bar","line","pie","funnel","ranking","board"]},"dataSets":{"type":"array","items":{"type":"object","properties":{"aggregation":{"type":"string","enum":["average","count","max","median","min","none","sum"]},"color":{"description":"Series color (hex string)","type":"string"},"fieldName":{"description":"Field name this series reads from","type":"string"},"labels":{"description":"Series labels (localized)","type":"object","additionalProperties":{"type":"string"}}}}},"donut":{"type":"boolean"},"labelPosition":{"type":"string","enum":["bottom","center","inside","outside","top"]},"legend":{"type":"object","properties":{"show":{"type":"boolean"}}},"limit":{"description":"ranking only: how many categories it shows","type":"integer","minimum":1,"maximum":20},"orientation":{"type":"string","enum":["horizontal","vertical"]},"showDataTable":{"type":"boolean"},"showLabels":{"type":"boolean"},"showPoints":{"type":"boolean"},"showTitle":{"type":"boolean"},"smooth":{"type":"boolean"},"stacked":{"type":"boolean"},"style":{"type":"string","enum":["default","half_donut","pad_angle","rounded_corner"]},"tooltips":{"type":"object","properties":{"show":{"type":"boolean"}}},"xAxis":{"type":"object","properties":{"fieldName":{"description":"X-axis field name, null removes it","type":["string","null"]},"groupBy":{"type":"string","enum":["daily","monthly","none","quarterly","weekly","yearly"]},"show":{"type":"boolean"}}},"yAxis":{"type":"object","properties":{"show":{"type":"boolean"}}}}},"columns":{"minItems":1,"type":"array","items":{"type":"object","properties":{"agg":{"description":"Aggregation function applied to the column","type":"string"},"conditionalStyling":{"description":"Legacy per-column conditional styling rules","type":"array","items":{"type":"object","properties":{"background":{"description":"Background color (hex string)","type":"string"},"cell":{"description":"Target cell","type":"string"},"color":{"description":"Icon color (hex string)","type":"string"},"icon":{"description":"Icon name","type":"string"},"operand":{"type":"string","description":"Comparator"},"value":{"type":"string","description":"Value compared against"}},"required":["operand","value"]}},"field":{"type":"string","description":"Field name, or a script expression for a calculated column"},"hidden":{"description":"Column retained but hidden from the grid","type":"boolean"},"id":{"description":"Stable identity of a calculated column; send it back unchanged when updating the view","type":"string"},"labels":{"description":"Column labels (localized)","type":"object","additionalProperties":{"type":"string"}},"order":{"type":"number","description":"Column display order"},"role":{"description":"Column role (e.g. title, date, image, location, color)","type":"string"},"width":{"description":"Column width","type":"number"}},"required":["field","order"]},"description":"View columns"},"conditionalFormatting":{"description":"Conditional formatting rules","type":"array","items":{"type":"object","properties":{"backgroundColor":{"description":"Background color (hex string)","type":"string"},"bold":{"description":"Bold text","type":"boolean"},"comparator":{"type":"string","enum":["contains","does_not_contain","ends_with","gt","gte","is","is_empty","is_not","is_not_empty","logic","lt","lte","starts_with"],"description":"Comparator"},"expression":{"description":"Script expression, used only when comparator is 'logic'","type":"string"},"fieldName":{"type":"string","description":"Target field name"},"highlightColor":{"description":"Highlight color (hex string)","type":"string"},"icon":{"description":"Icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"id":{"type":"string","description":"Stable rule id"},"italic":{"description":"Italic text","type":"boolean"},"order":{"type":"number","description":"Rule evaluation order"},"strikethrough":{"description":"Strikethrough text","type":"boolean"},"target":{"type":"string","enum":["cell","row"],"description":"Whether the rule styles a single cell or the whole row"},"textColor":{"description":"Text color (hex string)","type":"string"},"value":{"description":"Value compared against"}},"required":["comparator","fieldName","id","order","target"]}},"filter":{"description":"Stored filter conditions","type":"array","items":{"type":"object","properties":{"field":{"description":"Field name","type":"string"},"id":{"type":"string","description":"Stable condition id"},"operator":{"description":"Filter operator","type":"string"},"value":{"description":"Value compared against","type":"string"}},"required":["id"]}},"ganttConfig":{"description":"Gantt views: which fields the bars are read from","type":"object","properties":{"baselineEndFieldName":{"description":"Planned end field, rendered as a ghost bar","type":["string","null"]},"baselineStartFieldName":{"description":"Planned start field, rendered as a ghost bar","type":["string","null"]},"dependencyDirection":{"type":"string","enum":["predecessor","successor"]},"dependencyFieldName":{"description":"A reference field pointing back at this table","type":["string","null"]},"disableDragAndDrop":{"type":"boolean"},"endFieldName":{"type":["string","null"]},"hideTitleColumn":{"type":"boolean"},"hideWeekends":{"type":"boolean"},"milestoneFieldName":{"type":["string","null"]},"progressFieldName":{"type":["string","null"]},"showCriticalPath":{"type":"boolean"},"showWeekends":{"type":"boolean"},"startFieldName":{"type":["string","null"]},"timeScale":{"type":"string","enum":["day","month","quarter","week"]},"titleColumnFieldName":{"type":["string","null"]},"titleColumnWidth":{"type":"number"}}},"groupBy":{"description":"Grouping configuration","type":"array","items":{"type":"object","properties":{"direction":{"description":"Group order direction, defaults to ascending","type":"string","enum":["asc","desc"]},"fieldName":{"type":"string","description":"Field name"}},"required":["fieldName"]}},"icon":{"description":"View icon","type":"object","properties":{"color":{"type":"string"},"filling":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","minLength":1}}},"labels":{"description":"View labels (localized)","type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":100}},"name":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9_]+$","description":"View name"},"pivot":{"description":"Pivot views: axes to change, omitted axes are kept","type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"dateGrouping":{"description":"Date bucket, for date fields","type":"string","enum":["day","month","quarter","week","year"]},"fieldName":{"type":"string","description":"Field name"},"sort":{"type":"string","enum":["asc","desc"]}},"required":["fieldName"]},"description":"Column axis fields"},"columnWidths":{"type":"object","properties":{"rowHeader":{"description":"Row header width in px, null removes it","type":["number","null"]},"values":{"description":"Value column widths in px, keyed by `<fieldName>-<agg>`, null removes one","type":"object","additionalProperties":{"type":["number","null"]}}}},"rows":{"type":"array","items":{"type":"object","properties":{"dateGrouping":{"description":"Date bucket, for date fields","type":"string","enum":["day","month","quarter","week","year"]},"fieldName":{"type":"string","description":"Field name"},"sort":{"type":"string","enum":["asc","desc"]}},"required":["fieldName"]},"description":"Row axis fields"},"values":{"type":"array","items":{"type":"object","properties":{"agg":{"type":"string","enum":["avg","count","max","min","sum","unique"],"description":"Aggregation"},"fieldName":{"type":"string","description":"Field name"}},"required":["agg","fieldName"]},"description":"Aggregated value fields"}}},"search":{"description":"Stored search term","type":"string"},"sort":{"description":"Sort configuration","type":"object","properties":{"direction":{"type":"string","enum":["asc","desc"],"description":"Sort direction"},"fieldName":{"type":"string","description":"Field name"}}},"type":{"type":"string","enum":["Calendar","Chart","Gallery","Gantt","Kanban","List","Maps","Pivot","Table"],"description":"View type"}},"additionalProperties":false},"ViewResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"annualRecurring":{"description":"Calendar views only: render every record on the same day/month every year","type":"boolean"},"chartConfig":{"description":"Chart configuration (chart type, axes, datasets), for Chart views","type":"object","properties":{"chartType":{"type":"string","enum":["bar","line","pie","funnel","ranking","board"]},"dataSets":{"type":"array","items":{"type":"object","properties":{"aggregation":{"type":"string","enum":["average","count","max","median","min","none","sum"]},"color":{"description":"Series color (hex string)","type":"string"},"fieldName":{"description":"Field name this series reads from","type":"string"},"labels":{"description":"Series labels (localized)","type":"object","additionalProperties":{"type":"string"}}}}},"donut":{"type":"boolean"},"labelPosition":{"type":"string","enum":["bottom","center","inside","outside","top"]},"legend":{"type":"object","properties":{"show":{"type":"boolean"}}},"limit":{"description":"ranking only: how many categories it shows","type":"integer","minimum":1,"maximum":20},"orientation":{"type":"string","enum":["horizontal","vertical"]},"showDataTable":{"type":"boolean"},"showLabels":{"type":"boolean"},"showPoints":{"type":"boolean"},"showTitle":{"type":"boolean"},"smooth":{"type":"boolean"},"stacked":{"type":"boolean"},"style":{"type":"string","enum":["default","half_donut","pad_angle","rounded_corner"]},"tooltips":{"type":"object","properties":{"show":{"type":"boolean"}}},"xAxis":{"type":"object","properties":{"fieldName":{"description":"X-axis field name, null removes it","type":["string","null"]},"groupBy":{"type":"string","enum":["daily","monthly","none","quarterly","weekly","yearly"]},"show":{"type":"boolean"}}},"yAxis":{"type":"object","properties":{"show":{"type":"boolean"}}}},"required":["chartType","dataSets","xAxis"]},"columns":{"type":"array","items":{"type":"object","properties":{"agg":{"description":"Aggregation function applied to the column","type":"string"},"conditionalStyling":{"description":"Legacy per-column conditional styling rules","type":"array","items":{"type":"object","properties":{"background":{"description":"Background color (hex string)","type":"string"},"cell":{"description":"Target cell","type":"string"},"color":{"description":"Icon color (hex string)","type":"string"},"icon":{"description":"Icon name","type":"string"},"operand":{"type":"string","description":"Comparator"},"value":{"type":"string","description":"Value compared against"}},"required":["operand","value"]}},"field":{"type":"string","description":"Field name, or a script expression for a calculated column"},"hidden":{"description":"Column retained but hidden from the grid","type":"boolean"},"id":{"description":"Stable identity of a calculated column; send it back unchanged when updating the view","type":"string"},"labels":{"description":"Column labels (localized)","type":"object","additionalProperties":{"type":"string"}},"order":{"type":"number","description":"Column display order"},"role":{"description":"Column role (e.g. title, date, image, location, color)","type":"string"},"width":{"description":"Column width","type":"number"}},"required":["field","order"]},"description":"View columns"},"conditionalFormatting":{"description":"Conditional formatting rules","type":"array","items":{"type":"object","properties":{"backgroundColor":{"description":"Background color (hex string)","type":"string"},"bold":{"description":"Bold text","type":"boolean"},"comparator":{"type":"string","enum":["contains","does_not_contain","ends_with","gt","gte","is","is_empty","is_not","is_not_empty","logic","lt","lte","starts_with"],"description":"Comparator"},"expression":{"description":"Script expression, used only when comparator is 'logic'","type":"string"},"fieldName":{"type":"string","description":"Target field name"},"highlightColor":{"description":"Highlight color (hex string)","type":"string"},"icon":{"description":"Icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"id":{"type":"string","description":"Stable rule id"},"italic":{"description":"Italic text","type":"boolean"},"order":{"type":"number","description":"Rule evaluation order"},"strikethrough":{"description":"Strikethrough text","type":"boolean"},"target":{"type":"string","enum":["cell","row"],"description":"Whether the rule styles a single cell or the whole row"},"textColor":{"description":"Text color (hex string)","type":"string"},"value":{"description":"Value compared against"}},"required":["comparator","fieldName","id","order","target"]}},"filter":{"description":"Stored filter conditions","type":"array","items":{"type":"object","properties":{"field":{"description":"Field name","type":"string"},"id":{"type":"string","description":"Stable condition id"},"operator":{"description":"Filter operator","type":"string"},"value":{"description":"Value compared against","type":"string"}},"required":["id"]}},"ganttConfig":{"description":"Which fields the bars/milestones/dependencies are read from, for Gantt views","type":"object","properties":{"baselineEndFieldName":{"description":"Planned end field, rendered as a ghost bar","type":["string","null"]},"baselineStartFieldName":{"description":"Planned start field, rendered as a ghost bar","type":["string","null"]},"dependencyDirection":{"type":"string","enum":["predecessor","successor"]},"dependencyFieldName":{"description":"A reference field pointing back at this table","type":["string","null"]},"disableDragAndDrop":{"type":"boolean"},"endFieldName":{"type":["string","null"]},"hideTitleColumn":{"type":"boolean"},"hideWeekends":{"type":"boolean"},"milestoneFieldName":{"type":["string","null"]},"progressFieldName":{"type":["string","null"]},"showCriticalPath":{"type":"boolean"},"showWeekends":{"type":"boolean"},"startFieldName":{"type":["string","null"]},"timeScale":{"type":"string","enum":["day","month","quarter","week"]},"titleColumnFieldName":{"type":["string","null"]},"titleColumnWidth":{"type":"number"}}},"groupBy":{"description":"Grouping configuration","type":"array","items":{"type":"object","properties":{"direction":{"description":"Group order direction, defaults to ascending","type":"string","enum":["asc","desc"]},"fieldName":{"type":"string","description":"Field name"}},"required":["fieldName"]}},"icon":{"description":"View icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"id":{"type":"string","description":"View id"},"labels":{"description":"View labels (localized)","type":"object","additionalProperties":{"type":"string"}},"moduleName":{"type":"string","description":"Module name"},"name":{"type":"string","description":"View name"},"order":{"type":"number","description":"View display order"},"pivot":{"description":"Pivot configuration (row/column/value axes), for Pivot views","type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"dateGrouping":{"description":"Date bucket, for date fields","type":"string","enum":["day","month","quarter","week","year"]},"fieldName":{"type":"string","description":"Field name"},"sort":{"type":"string","enum":["asc","desc"]}},"required":["fieldName"]},"description":"Column axis fields"},"columnWidths":{"description":"Column widths set in the pivot","type":"object","properties":{"rowHeader":{"description":"Row header width in px","type":"number"},"values":{"description":"Value column widths in px, keyed by `<fieldName>-<agg>`","type":"object","additionalProperties":{"type":"number"}}}},"rows":{"type":"array","items":{"type":"object","properties":{"dateGrouping":{"description":"Date bucket, for date fields","type":"string","enum":["day","month","quarter","week","year"]},"fieldName":{"type":"string","description":"Field name"},"sort":{"type":"string","enum":["asc","desc"]}},"required":["fieldName"]},"description":"Row axis fields"},"values":{"type":"array","items":{"type":"object","properties":{"agg":{"type":"string","enum":["avg","count","max","min","sum","unique"],"description":"Aggregation"},"fieldName":{"type":"string","description":"Field name"}},"required":["agg","fieldName"]},"description":"Aggregated value fields"}},"required":["columns","rows","values"]},"search":{"description":"Stored search term","type":"string"},"sort":{"description":"Sort configuration","type":"object","properties":{"direction":{"type":"string","enum":["asc","desc"],"description":"Sort direction"},"fieldName":{"type":"string","description":"Field name"}},"required":["direction","fieldName"]},"tableName":{"type":"string","description":"Table name"},"type":{"type":"string","enum":["Calendar","Chart","Gallery","Gantt","Kanban","List","Maps","Pivot","Table"],"description":"View type"}},"description":"View details"}},"required":["data"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}},"required":["error"]}}},"paths":{"/api/v1/workspace/{workspaceId}/views/{viewId}":{"patch":{"operationId":"ViewsV1Controller_updateView","summary":"Update a view","description":"Updates a view. Nested configs (chartConfig, ganttConfig, pivot) are merged onto the stored ones, so a PATCH can send just the settings it changes.","parameters":[{"name":"viewId","required":true,"in":"path","description":"View ID","schema":{"minLength":12,"maxLength":12,"pattern":"^[a-z0-9]+$","type":"string"}},{"name":"workspaceId","required":true,"in":"path","description":"Workspace ID","schema":{"minLength":12,"maxLength":12,"pattern":"^[a-z0-9]+$","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateViewBody"}}}},"responses":{"200":{"description":"View updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViewResponse"}}}},"400":{"description":"Bad request (e.g., unsupported view type)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"View not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Views"]}}}}
```

## Export a view to XLSX

> Exports a view's rows as an XLSX workbook, with the view's columns in the view's order. Each header is the column's caption in the view, else the field's label, else the field's name. Choice cells hold the option label, and multi-choice cells hold the option labels joined with ", ". Headers and option labels are in the language of the X-App-Language header (default "en"). A label missing in that language falls back to the default label. Labels can repeat, so two columns can share a header. For stable field names and option ids, read the rows from GET /workspace/{workspaceId}/modules/{moduleName}/tables/{tableName}/records.

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"API Key","description":"Enter your Workspace API key. \n\n API keys can be generated and managed within the **Workspace Integration** settings in the Ninox app.","in":"header","name":"Authorization","type":"http"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}},"required":["error"]}}},"paths":{"/api/v1/workspace/{workspaceId}/export/view/{viewId}/xlsx":{"post":{"operationId":"ViewsV1Controller_exportViewXlsx","summary":"Export a view to XLSX","description":"Exports a view's rows as an XLSX workbook, with the view's columns in the view's order. Each header is the column's caption in the view, else the field's label, else the field's name. Choice cells hold the option label, and multi-choice cells hold the option labels joined with \", \". Headers and option labels are in the language of the X-App-Language header (default \"en\"). A label missing in that language falls back to the default label. Labels can repeat, so two columns can share a header. For stable field names and option ids, read the rows from GET /workspace/{workspaceId}/modules/{moduleName}/tables/{tableName}/records.","parameters":[{"name":"viewId","required":true,"in":"path","description":"View ID","schema":{"minLength":12,"maxLength":12,"pattern":"^[a-z0-9]+$","type":"string"}},{"name":"workspaceId","required":true,"in":"path","description":"Workspace ID","schema":{"minLength":12,"maxLength":12,"pattern":"^[a-z0-9]+$","type":"string"}}],"responses":{"200":{"description":"XLSX workbook"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"View not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Views"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ninox.com/ninox-api/api-reference/api-endpoints/views.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
