Interface: DataSetsAPI

DataSetsAPI

API class that is used to create, use, and delete data sets.

Example

dashboard.getFeature('DataSets')

Methods

create(assetId, columnIdList) → {String}

Creates a data set under the current dashboard with an array of column IDs.

Parameters:
Name Type Description
assetId String

Asset ID of the data source used to create the data set.

columnIdList Array.<String>

Array of column IDs used to create the data set

Returns:

Data set asset ID

Type
String

delete(assetIdList) → {Promise}

Deletes the data sets with an array of data set asset IDs.

Parameters:
Name Type Description
assetIdList Array.<Sting>

Array of asset IDs of the data sets to be deleted.

Returns:

Resolves on successful deletion of data set and rejected in the case of an error.

Type
Promise

use(assetId, widgetIdList) → {Promise}

Uses the dataset with asset ID to render the list of widgets. Note that this operation is not supported if the dataset was created from an OLAP source.

Parameters:
Name Type Description
assetId String

Data set asset ID to use, resets to original datasource if not provided.

widgetIdList Array.<String>

Array of widget IDs to re-render with the specified data set.

Returns:

Resolves on successful use of data set and rejected in the case of an error.

Type
Promise