Component description
The extraRequestData property is used when the API table loads data from an external source. It defines which data source to call and which fields from that source are available for use in the table.
Minimal JSON
{}{
"type": "api-table",
"tableId": "simple_table_most_active_users",
"api": "https://help.dawiso.com/api/sql-external/table",
"columns": [
{
"type": "externalKey",
"value": "user_link",
"title": "user_link",
"isHtml": true
},
{
"type": "externalKey",
"value": "viewed_pages",
"title": "viewed_pages"
}
],
"extraRequestData": {
"datasource": "core_statistic_table_most_active_users",
"columns": [
{
"title": "user_link",
"value": "user_link"
},
{
"title": "viewed_pages",
"value": "viewed_pages"
}
]
},
"defaultSort": {
"predicate": "viewed_pages",
"reverse": true
},
"hideActions": true
}Example taken from the core_dashboard_adoption package.
Nested properties
| Property | Description | Values | Mandatory |
|---|---|---|---|
dataSource | Identifies the external source that is queried to provide data for the API table. | string | No |
columns | Array of fields that are requested from that data source and then used as the API table’s columns (externalKey column type). Each column has a title (name) and value: { "title": "", "value": "" } | array | No |
Object links in exported columns
A column with "valueType": "objectLinks" in the API table’s columns shows object links in the table. The Excel export of that table writes only the object names, separated by commas.
If a column appears only in extraRequestData.columns (export-only, not in columns), declare valueType in the column object here. Without it, the export writes the raw JSON returned by the SQL query.
"extraRequestData": {
"datasource": "my_sql_view",
"columns": [
{
"title": "Dimension values",
"value": "dimension_values",
"valueType": "objectLinks"
}
]
}
Supported data sources
| Data source | Description |
|---|---|
core_statistic_table_most_active_users | Returns a list of most active users. |
core_statistics_list_of_relations | Returns a list of relations. |
core_statistics_most_visited_applications | Returns a list of most visited applications. |