Component description
The api-table component creates a table with objects, their details, and attributes.
Example
Minimal JSON
{
"type": "api-table",
"tableId": "",
"columns": []
}{
"type": "api-table",
"tableId": "",
"value": ""
}JSON 3
{
"type": "api-table",
"componentId": "table#`child_objects`",
"tableId": "table#`child_objects`",
"filter": {
"parentObjectId": {
"value": "@objectId"
},
"levels": {
"value": 1
}
},
"columns": [
{
"type": "definedKey",
"value": "objectName"
},
{
"type": "attributeTypeKey",
"value": "`core_description`"
}
]
}Example taken from the core package.
Nested properties
| Property | Description | Values | Mandatory |
|---|---|---|---|
type | api-table | string | Yes |
tableId | Unique identifier for the API table. Necessary when multiple API tables are created for the same object to ensure the correct columns and filters are applied to each. | string | Yes |
columns | Array of columns in the table. | array | Yes* (if no valueproperty) |
value | Reference to a preconfigured table’s ID to reuse it instead of creating a new table. E.g., MrFavouritesTable. | string | Yes* (if no column property) |
addNewObjectButton | Adds a “New Object” button to an empty table. | boolean | No |
api | API endpoint which provides data for the table. See the full list of available API endpoints. | string | No |
bulkEditable | Enables bulk edit of one attribute for multiple rows. | boolean | No |
componentId | Unique ID of a component. If left empty, a random string will be generated. Primarily used in patch packages to define the component’s position within the layout (template). | string | No |
defaultSort | Default column used to sort the table. | json | No |
displaySettings | Configures display options for the table. See displaySettings properties. | json | No |
exportable | Enables Excel export for an external table in a dashboard. When true, an export button appears on the table (no row checkboxes); clicking it exports the full table immediately without a modal. Must be paired with an export action on an adjacent section-title. See actions (section title component). | boolean | No |
extraRequestData | Definition of an external data source and its data to be used in the API table. Used when the API is /api/sql-external/table. | json | No |
filter | Filter conditions. | array | No |
hideActions | Determines whether the API table is a plain static table without any filter, sort, or other actions. | boolean | No |
noDataSecondaryText | Translation key for the secondary message shown below noDataText when the table has no data. Not displayed if not provided. Define in translations to specify how the text is displayed in the UI. | string | No |
noDataText | Translation key for the message shown when the table has no data. Defaults to “No items to show yet” if not provided. Define in translations to specify how the text is displayed in the UI. | string | No |
objectTypeKey | Key of the object type. | string | No |
showAllColumnContent | Determines whether the value in columns is shortened to fit or displayed fully. | boolean | No |
title | Translation key of the title. Define the key in translations to specify how the text is displayed in the UI. Unlike the name property, if you use a specific string of text for the title, this text will appear with the package key. For example, Comment Section will be displayed as package_key_comment section. | string | No |
displaySettings properties
{
"type": "api-table",
"...",
"displaySettings": {
"empty": "compact"
}
}
| Property | Description | Values | Mandatory |
|---|---|---|---|
empty | Controls the size of the empty state displayed when the table has no data. | medium (default) | compact | large | No |
Dashboard export
API tables in dashboards support Excel export in two modes:
- Standard table (over MR objects): The export modal skips the file type and object selection steps and opens directly at the Attributes step. When using Select all, at least one of the following filters must be set in the package:
app,space, orOTs. Without a filter, individual row selection still works, but Select all returns an error. - External table (via
api): Setexportable: trueon theapi-tableand add anexportaction to the adjacentsection-title. The export button appears on the table; clicking it exports the full table immediately with no modal or row checkboxes.