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

PropertyDescriptionValuesMandatory
typeapi-tablestringYes
tableIdUnique 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.stringYes
columnsArray of columns in the table.arrayYes* (if no valueproperty)
valueReference to a preconfigured table’s ID to reuse it instead of creating a new table. E.g., MrFavouritesTable.stringYes* (if no column property)
addNewObjectButtonAdds a “New Object” button to an empty table.booleanNo
apiAPI endpoint which provides data for the table. See the full list of available API endpoints.stringNo
bulkEditableEnables bulk edit of one attribute for multiple rows.booleanNo
componentIdUnique 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).stringNo
defaultSortDefault column used to sort the table.jsonNo
displaySettingsConfigures display options for the table. See displaySettings properties.jsonNo
exportableEnables 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).booleanNo
extraRequestDataDefinition of an external data source and its data to be used in the API table. Used when the API is /api/sql-external/table.jsonNo
filterFilter conditions.arrayNo
hideActionsDetermines whether the API table is a plain static table without any filter, sort, or other actions.booleanNo
noDataSecondaryTextTranslation 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.stringNo
noDataTextTranslation 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.stringNo
objectTypeKeyKey of the object type.stringNo
showAllColumnContentDetermines whether the value in columns is shortened to fit or displayed fully.booleanNo
titleTranslation 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.stringNo

displaySettings properties

{
  "type": "api-table",
  "...",
  "displaySettings": {
    "empty": "compact"
  }
}
PropertyDescriptionValuesMandatory
emptyControls the size of the empty state displayed when the table has no data.medium (default) | compact | largeNo

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, or OTs. Without a filter, individual row selection still works, but Select all returns an error.
  • External table (via api): Set exportable: true on the api-table and add an export action to the adjacent section-title. The export button appears on the table; clicking it exports the full table immediately with no modal or row checkboxes.