> 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/reports.md).

# Reports

## List all reports in a table

> Retrieves all reports 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":{"ReportsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"fontFamily":{"description":"Default font family","type":"string"},"fontSize":{"description":"Default font size","type":"number"},"footHeight":{"type":"number","description":"Footer height"},"headHeight":{"type":"number","description":"Header height"},"id":{"type":"string","description":"Report id"},"inlineStyle":{"description":"Inline CSS applied to the report","type":"string"},"labels":{"description":"Report labels (localized)","type":"object","additionalProperties":{"type":"string"}},"marginB":{"type":"number","description":"Bottom page margin"},"marginL":{"type":"number","description":"Left page margin"},"marginR":{"type":"number","description":"Right page margin"},"marginT":{"type":"number","description":"Top page margin"},"moduleName":{"type":"string","description":"Module name"},"name":{"type":"string","description":"Report name"},"objects":{"type":"array","items":{"type":"object","properties":{"backgroundColor":{"description":"Background color (hex string)","type":"string"},"base":{"type":"string","enum":["html","image","imagefield","rev","text"],"description":"Report object kind"},"borderColor":{"description":"Border color (hex string)","type":"string"},"borderRadius":{"description":"Border radius","type":"number"},"borderStyle":{"description":"Border style","type":"string"},"borderWidth":{"description":"Border width","type":"number"},"expression":{"description":"Reverse field name this object displays, for rev objects","type":"string"},"fid":{"description":"Field name, for imagefield objects","type":"string"},"file":{"description":"File id, for image objects","type":"string"},"fn":{"description":"Bound expression producing HTML, for html objects","type":"string"},"fontFamily":{"description":"Font family","type":"string"},"fontSize":{"description":"Font size","type":"number"},"fontStyle":{"description":"Font style","type":"string","enum":["italic"]},"fontWeight":{"description":"Font weight","type":"string","enum":["bold"]},"h":{"type":"number","description":"Height"},"id":{"description":"Stable identity of the object; send it back unchanged when updating the report","type":"string"},"isAutoHeight":{"description":"Auto-size height to content, for html objects","type":"boolean"},"lineHeight":{"description":"Line height, for text objects","type":"number"},"paddingB":{"description":"Bottom padding, for html/rev/text objects","type":"number"},"paddingL":{"description":"Left padding, for html/rev/text objects","type":"number"},"paddingR":{"description":"Right padding, for html/rev/text objects","type":"number"},"paddingT":{"description":"Top padding, for html/rev/text objects","type":"number"},"position":{"type":"string","enum":["foot","head","page"],"description":"Report section this object belongs to"},"showFoot":{"description":"Show table footer, for rev objects","type":"boolean"},"showHead":{"description":"Show table header, for rev objects","type":"boolean"},"tableBorderStyle":{"description":"Table border style, for rev objects","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]},{"type":"number","enum":[2]},{"type":"number","enum":[3]},{"type":"number","enum":[4]},{"type":"number","enum":[5]},{"type":"number","enum":[6]}]},"text":{"description":"Literal text, for text objects","type":"string"},"textAlign":{"description":"Text alignment","type":"string","enum":["center","left","right"]},"textColor":{"description":"Text color (hex string)","type":"string"},"textDecoration":{"description":"Text decoration","type":"string","enum":["underline"]},"verticalAlign":{"description":"Vertical alignment, for html/text objects","type":"string"},"viewConfig":{"description":"Columns/filter/sort for the underlying table, for rev objects","type":"object","properties":{"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":"Sub-table 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"]}},"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"]}},"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"]},"viewType":{"type":"string","enum":["Calendar","Chart","Gallery","Gantt","Kanban","List","Maps","Pivot","Table"],"description":"Sub-table view type"}},"required":["columns","viewType"]},"w":{"type":"number","description":"Width"},"x":{"type":"number","description":"X position"},"y":{"type":"number","description":"Y position"}},"required":["base","h","position","w","x","y"]},"description":"Report layout objects"},"paperHeight":{"type":"number","description":"Paper height"},"paperWidth":{"type":"number","description":"Paper width"},"printAttachments":{"description":"Include row attachments when printing","type":"boolean"},"tableName":{"type":"string","description":"Table name"}},"required":["footHeight","headHeight","id","marginB","marginL","marginR","marginT","moduleName","name","objects","paperHeight","paperWidth","tableName"]},"description":"List of reports"}},"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}/reports":{"get":{"operationId":"ReportsV1Controller_getReports","summary":"List all reports in a table","description":"Retrieves all reports 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":"Reports retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsResponse"}}}},"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":["Reports"]}}}}
```

## Create a report

> Creates a report (print layout) for a table. Omit \`objects\` to auto-generate a layout from the table's current fields, matching the report designer's automatic layout option.

```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":{"CreateReportBody":{"type":"object","properties":{"fontFamily":{"description":"Default font family","type":"string"},"fontSize":{"description":"Default font size","type":"number"},"footHeight":{"default":20,"description":"Footer height","type":"number"},"headHeight":{"default":20,"description":"Header height","type":"number"},"inlineStyle":{"description":"Inline CSS applied to the report","type":"string"},"labels":{"description":"Report labels (localized)","type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":100}},"marginB":{"default":20,"description":"Bottom page margin","type":"number"},"marginL":{"default":20,"description":"Left page margin","type":"number"},"marginR":{"default":20,"description":"Right page margin","type":"number"},"marginT":{"default":20,"description":"Top page margin","type":"number"},"name":{"type":"string","minLength":1,"maxLength":100,"description":"Report name"},"objects":{"description":"Report layout objects. Omit to auto-generate a layout from the table’s current fields.","type":"array","items":{"type":"object","properties":{"backgroundColor":{"description":"Background color (hex string)","type":"string"},"base":{"type":"string","enum":["html","image","imagefield","rev","text"],"description":"Report object kind"},"borderColor":{"description":"Border color (hex string)","type":"string"},"borderRadius":{"description":"Border radius","type":"number"},"borderStyle":{"description":"Border style","type":"string"},"borderWidth":{"description":"Border width","type":"number"},"expression":{"description":"Reverse field name this object displays, for rev objects","type":"string"},"fid":{"description":"Field name, for imagefield objects","type":"string"},"file":{"description":"File id, for image objects","type":"string"},"fn":{"description":"Bound expression producing HTML, for html objects","type":"string"},"fontFamily":{"description":"Font family","type":"string"},"fontSize":{"description":"Font size","type":"number"},"fontStyle":{"description":"Font style","type":"string","enum":["italic"]},"fontWeight":{"description":"Font weight","type":"string","enum":["bold"]},"h":{"type":"number","description":"Height"},"id":{"description":"Stable identity of the object; send it back unchanged when updating the report","type":"string"},"isAutoHeight":{"description":"Auto-size height to content, for html objects","type":"boolean"},"lineHeight":{"description":"Line height, for text objects","type":"number"},"paddingB":{"description":"Bottom padding, for html/rev/text objects","type":"number"},"paddingL":{"description":"Left padding, for html/rev/text objects","type":"number"},"paddingR":{"description":"Right padding, for html/rev/text objects","type":"number"},"paddingT":{"description":"Top padding, for html/rev/text objects","type":"number"},"position":{"type":"string","enum":["foot","head","page"],"description":"Report section this object belongs to"},"showFoot":{"description":"Show table footer, for rev objects","type":"boolean"},"showHead":{"description":"Show table header, for rev objects","type":"boolean"},"tableBorderStyle":{"description":"Table border style, for rev objects","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]},{"type":"number","enum":[2]},{"type":"number","enum":[3]},{"type":"number","enum":[4]},{"type":"number","enum":[5]},{"type":"number","enum":[6]}]},"text":{"description":"Literal text, for text objects","type":"string"},"textAlign":{"description":"Text alignment","type":"string","enum":["center","left","right"]},"textColor":{"description":"Text color (hex string)","type":"string"},"textDecoration":{"description":"Text decoration","type":"string","enum":["underline"]},"verticalAlign":{"description":"Vertical alignment, for html/text objects","type":"string"},"viewConfig":{"description":"Columns/filter/sort for the underlying table, for rev objects","type":"object","properties":{"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":"Sub-table 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"]}},"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"]}},"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"]},"viewType":{"type":"string","enum":["Calendar","Chart","Gallery","Gantt","Kanban","List","Maps","Pivot","Table"],"description":"Sub-table view type"}},"required":["columns","viewType"]},"w":{"type":"number","description":"Width"},"x":{"type":"number","description":"X position"},"y":{"type":"number","description":"Y position"}},"required":["base","h","position","w","x","y"]}},"paperHeight":{"default":297,"description":"Paper height","type":"number"},"paperWidth":{"default":210,"description":"Paper width","type":"number"},"printAttachments":{"description":"Include row attachments when printing","type":"boolean"}},"required":["name"],"additionalProperties":false},"ReportResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"fontFamily":{"description":"Default font family","type":"string"},"fontSize":{"description":"Default font size","type":"number"},"footHeight":{"type":"number","description":"Footer height"},"headHeight":{"type":"number","description":"Header height"},"id":{"type":"string","description":"Report id"},"inlineStyle":{"description":"Inline CSS applied to the report","type":"string"},"labels":{"description":"Report labels (localized)","type":"object","additionalProperties":{"type":"string"}},"marginB":{"type":"number","description":"Bottom page margin"},"marginL":{"type":"number","description":"Left page margin"},"marginR":{"type":"number","description":"Right page margin"},"marginT":{"type":"number","description":"Top page margin"},"moduleName":{"type":"string","description":"Module name"},"name":{"type":"string","description":"Report name"},"objects":{"type":"array","items":{"type":"object","properties":{"backgroundColor":{"description":"Background color (hex string)","type":"string"},"base":{"type":"string","enum":["html","image","imagefield","rev","text"],"description":"Report object kind"},"borderColor":{"description":"Border color (hex string)","type":"string"},"borderRadius":{"description":"Border radius","type":"number"},"borderStyle":{"description":"Border style","type":"string"},"borderWidth":{"description":"Border width","type":"number"},"expression":{"description":"Reverse field name this object displays, for rev objects","type":"string"},"fid":{"description":"Field name, for imagefield objects","type":"string"},"file":{"description":"File id, for image objects","type":"string"},"fn":{"description":"Bound expression producing HTML, for html objects","type":"string"},"fontFamily":{"description":"Font family","type":"string"},"fontSize":{"description":"Font size","type":"number"},"fontStyle":{"description":"Font style","type":"string","enum":["italic"]},"fontWeight":{"description":"Font weight","type":"string","enum":["bold"]},"h":{"type":"number","description":"Height"},"id":{"description":"Stable identity of the object; send it back unchanged when updating the report","type":"string"},"isAutoHeight":{"description":"Auto-size height to content, for html objects","type":"boolean"},"lineHeight":{"description":"Line height, for text objects","type":"number"},"paddingB":{"description":"Bottom padding, for html/rev/text objects","type":"number"},"paddingL":{"description":"Left padding, for html/rev/text objects","type":"number"},"paddingR":{"description":"Right padding, for html/rev/text objects","type":"number"},"paddingT":{"description":"Top padding, for html/rev/text objects","type":"number"},"position":{"type":"string","enum":["foot","head","page"],"description":"Report section this object belongs to"},"showFoot":{"description":"Show table footer, for rev objects","type":"boolean"},"showHead":{"description":"Show table header, for rev objects","type":"boolean"},"tableBorderStyle":{"description":"Table border style, for rev objects","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]},{"type":"number","enum":[2]},{"type":"number","enum":[3]},{"type":"number","enum":[4]},{"type":"number","enum":[5]},{"type":"number","enum":[6]}]},"text":{"description":"Literal text, for text objects","type":"string"},"textAlign":{"description":"Text alignment","type":"string","enum":["center","left","right"]},"textColor":{"description":"Text color (hex string)","type":"string"},"textDecoration":{"description":"Text decoration","type":"string","enum":["underline"]},"verticalAlign":{"description":"Vertical alignment, for html/text objects","type":"string"},"viewConfig":{"description":"Columns/filter/sort for the underlying table, for rev objects","type":"object","properties":{"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":"Sub-table 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"]}},"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"]}},"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"]},"viewType":{"type":"string","enum":["Calendar","Chart","Gallery","Gantt","Kanban","List","Maps","Pivot","Table"],"description":"Sub-table view type"}},"required":["columns","viewType"]},"w":{"type":"number","description":"Width"},"x":{"type":"number","description":"X position"},"y":{"type":"number","description":"Y position"}},"required":["base","h","position","w","x","y"]},"description":"Report layout objects"},"paperHeight":{"type":"number","description":"Paper height"},"paperWidth":{"type":"number","description":"Paper width"},"printAttachments":{"description":"Include row attachments when printing","type":"boolean"},"tableName":{"type":"string","description":"Table name"}},"description":"Report 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}/reports":{"post":{"operationId":"ReportsV1Controller_createReport","summary":"Create a report","description":"Creates a report (print layout) for a table. Omit `objects` to auto-generate a layout from the table's current fields, matching the report designer's automatic layout option.","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/CreateReportBody"}}}},"responses":{"201":{"description":"Report created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponse"}}}},"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":["Reports"]}}}}
```

## Get a specific report

> Retrieves a specific report 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":{"ReportResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"fontFamily":{"description":"Default font family","type":"string"},"fontSize":{"description":"Default font size","type":"number"},"footHeight":{"type":"number","description":"Footer height"},"headHeight":{"type":"number","description":"Header height"},"id":{"type":"string","description":"Report id"},"inlineStyle":{"description":"Inline CSS applied to the report","type":"string"},"labels":{"description":"Report labels (localized)","type":"object","additionalProperties":{"type":"string"}},"marginB":{"type":"number","description":"Bottom page margin"},"marginL":{"type":"number","description":"Left page margin"},"marginR":{"type":"number","description":"Right page margin"},"marginT":{"type":"number","description":"Top page margin"},"moduleName":{"type":"string","description":"Module name"},"name":{"type":"string","description":"Report name"},"objects":{"type":"array","items":{"type":"object","properties":{"backgroundColor":{"description":"Background color (hex string)","type":"string"},"base":{"type":"string","enum":["html","image","imagefield","rev","text"],"description":"Report object kind"},"borderColor":{"description":"Border color (hex string)","type":"string"},"borderRadius":{"description":"Border radius","type":"number"},"borderStyle":{"description":"Border style","type":"string"},"borderWidth":{"description":"Border width","type":"number"},"expression":{"description":"Reverse field name this object displays, for rev objects","type":"string"},"fid":{"description":"Field name, for imagefield objects","type":"string"},"file":{"description":"File id, for image objects","type":"string"},"fn":{"description":"Bound expression producing HTML, for html objects","type":"string"},"fontFamily":{"description":"Font family","type":"string"},"fontSize":{"description":"Font size","type":"number"},"fontStyle":{"description":"Font style","type":"string","enum":["italic"]},"fontWeight":{"description":"Font weight","type":"string","enum":["bold"]},"h":{"type":"number","description":"Height"},"id":{"description":"Stable identity of the object; send it back unchanged when updating the report","type":"string"},"isAutoHeight":{"description":"Auto-size height to content, for html objects","type":"boolean"},"lineHeight":{"description":"Line height, for text objects","type":"number"},"paddingB":{"description":"Bottom padding, for html/rev/text objects","type":"number"},"paddingL":{"description":"Left padding, for html/rev/text objects","type":"number"},"paddingR":{"description":"Right padding, for html/rev/text objects","type":"number"},"paddingT":{"description":"Top padding, for html/rev/text objects","type":"number"},"position":{"type":"string","enum":["foot","head","page"],"description":"Report section this object belongs to"},"showFoot":{"description":"Show table footer, for rev objects","type":"boolean"},"showHead":{"description":"Show table header, for rev objects","type":"boolean"},"tableBorderStyle":{"description":"Table border style, for rev objects","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]},{"type":"number","enum":[2]},{"type":"number","enum":[3]},{"type":"number","enum":[4]},{"type":"number","enum":[5]},{"type":"number","enum":[6]}]},"text":{"description":"Literal text, for text objects","type":"string"},"textAlign":{"description":"Text alignment","type":"string","enum":["center","left","right"]},"textColor":{"description":"Text color (hex string)","type":"string"},"textDecoration":{"description":"Text decoration","type":"string","enum":["underline"]},"verticalAlign":{"description":"Vertical alignment, for html/text objects","type":"string"},"viewConfig":{"description":"Columns/filter/sort for the underlying table, for rev objects","type":"object","properties":{"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":"Sub-table 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"]}},"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"]}},"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"]},"viewType":{"type":"string","enum":["Calendar","Chart","Gallery","Gantt","Kanban","List","Maps","Pivot","Table"],"description":"Sub-table view type"}},"required":["columns","viewType"]},"w":{"type":"number","description":"Width"},"x":{"type":"number","description":"X position"},"y":{"type":"number","description":"Y position"}},"required":["base","h","position","w","x","y"]},"description":"Report layout objects"},"paperHeight":{"type":"number","description":"Paper height"},"paperWidth":{"type":"number","description":"Paper width"},"printAttachments":{"description":"Include row attachments when printing","type":"boolean"},"tableName":{"type":"string","description":"Table name"}},"description":"Report details"}},"required":["data"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}},"required":["error"]}}},"paths":{"/api/v1/workspace/{workspaceId}/reports/{reportId}":{"get":{"operationId":"ReportsV1Controller_getReport","summary":"Get a specific report","description":"Retrieves a specific report by id","parameters":[{"name":"reportId","required":true,"in":"path","description":"Report 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":"Report details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Reports"]}}}}
```

## Print a report

> Renders a report for a record (or a merged run across several) as a PDF

```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":{"PrintReportBody":{"type":"object","properties":{"rowId":{"description":"Record to render the report for","type":"integer","minimum":1,"maximum":9007199254740991},"rowIds":{"description":"Additional records to render into the same document (a merged print run). rowId is always included alongside these, so rowId plus rowIds together may not exceed 250 records.","maxItems":249,"type":"array","items":{"type":"integer","minimum":1,"maximum":9007199254740991}}},"required":["rowId"]},"PrintReportResponseDto":{"type":"object","properties":{"data":{"type":"object","properties":{"fileName":{"type":"string","description":"Rendered file name"},"mimeType":{"type":"string","description":"Rendered file MIME type"},"url":{"type":"string","description":"Presigned URL to download the rendered document"}}}},"required":["data"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}},"required":["error"]}}},"paths":{"/api/v1/workspace/{workspaceId}/reports/{reportId}/print":{"post":{"operationId":"ReportsV1Controller_printReport","summary":"Print a report","description":"Renders a report for a record (or a merged run across several) as a PDF","parameters":[{"name":"reportId","required":true,"in":"path","description":"Report 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/PrintReportBody"}}}},"responses":{"200":{"description":"Report rendered successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrintReportResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Reports"]}}}}
```


---

# 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/reports.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.
