IWorkspaceInsightsService
Service to query, update or delete insights, and other methods related to insights. Check IInsight for more details.
export interface IWorkspaceInsightsService
Methods
Method | Description |
|---|---|
Create and save insight for the provided insight definition | |
Delete insight with the given reference | |
Request insight for the given reference | |
Get all metadata objects referenced by a given insight. | |
Get all metadata objects which uses specified object(ie. object is used by these objects) by a given reference. | |
Queries workspace insights, using various criteria and paging settings. | |
List insights | |
Get insight with the filters provided merged with the filters specified by the insight itself. | |
Request insight for the given reference together with related catalog items | |
Request visualization class for the given reference | |
Request all visualization classes | |
Sets insight certification metadata. | |
Update provided insight | |
Update metadata object for the insight |
Method details
IWorkspaceInsightsService.createInsight()method
Create and save insight for the provided insight definition
createInsight(insight: IInsightDefinitionWithOptionalIdentity, generatedId?: boolean): Promise<IInsight>;
Parameters
Parameter | Type | Description |
|---|---|---|
insight | insight definition | |
generatedId | boolean | (Optional) if true, backend will generate insight id, otherwise the id must be provided in the insight definition, defaults to true |
Returns
Promise<IInsight>
promise of created insight
IWorkspaceInsightsService.deleteInsight()method
Delete insight with the given reference
deleteInsight(ref: ObjRef): Promise<void>;
Parameters
Parameter | Type | Description |
|---|---|---|
ref | ref of the insight to delete |
Returns
Promise<void>
promise of undefined
IWorkspaceInsightsService.getInsight()method
Request insight for the given reference
getInsight(ref: ObjRef, options?: IGetInsightOptions): Promise<IInsight>;
Parameters
Parameter | Type | Description |
|---|---|---|
ref | insight reference | |
options | (Optional) specify additional options |
Returns
Promise<IInsight>
promise of insight
IWorkspaceInsightsService.getInsightReferencedObjects()method
Get all metadata objects referenced by a given insight.
getInsightReferencedObjects(insight: IInsight, types?: SupportedInsightReferenceTypes[]): Promise<IInsightReferences>;
Parameters
Parameter | Type | Description |
|---|---|---|
insight | insight to get referenced objects for | |
types | (Optional) optional array of object types to include, when not specified, all supported references will be retrieved |
Returns
Promise<IInsightReferences>
IWorkspaceInsightsService.getInsightReferencingObjects()method
Get all metadata objects which uses specified object(ie. object is used by these objects) by a given reference.
getInsightReferencingObjects(ref: ObjRef): Promise<IInsightReferencing>;
Parameters
Parameter | Type | Description |
|---|---|---|
ref | ref of the insight to get referencing objects for |
Returns
Promise<IInsightReferencing>
IWorkspaceInsightsService.getInsights()method
Queries workspace insights, using various criteria and paging settings.
getInsights(options?: IInsightsQueryOptions): Promise<IInsightsQueryResult>;
Parameters
Parameter | Type | Description |
|---|---|---|
options | (Optional) query options; if not specified defaults to no sorting, no filtering and 50 items per page |
Returns
Promise<IInsightsQueryResult>
paged results, empty page with zero total count if there are no insights stored in the workspace
IWorkspaceInsightsService.getInsightsQuery()method
List insights
getInsightsQuery(): IInsightsQuery;
Returns
methods for querying insights
IWorkspaceInsightsService.getInsightWithAddedFilters()method
Get insight with the filters provided merged with the filters specified by the insight itself.
getInsightWithAddedFilters<T extends IInsightDefinition>(insight: T, filters: IFilter[]): Promise<T>;
Parameters
Parameter | Type | Description |
|---|---|---|
insight | T | insight to start with |
filters | IFilter[] | filters to merge |
Returns
Promise<T>
promise of new insight with the filters merged in
IWorkspaceInsightsService.getInsightWithCatalogItems()method
Request insight for the given reference together with related catalog items
getInsightWithCatalogItems(ref: ObjRef, options?: IGetInsightOptions): Promise<{
insight: IInsight;
catalogItems: Array<ICatalogFact | ICatalogMeasure | ICatalogAttribute>;
}>;
Parameters
Parameter | Type | Description |
|---|---|---|
ref | insight reference | |
options | (Optional) specify additional options |
Returns
Promise<{ insight: IInsight; catalogItems: Array<ICatalogFact | ICatalogMeasure | ICatalogAttribute>; }>
promise of catalog item of type metric or fact
IWorkspaceInsightsService.getVisualizationClass()method
Request visualization class for the given reference
getVisualizationClass(ref: ObjRef): Promise<IVisualizationClass>;
Parameters
Parameter | Type | Description |
|---|---|---|
ref | visualization class reference |
Returns
Promise<IVisualizationClass>
promise of visualization class
IWorkspaceInsightsService.getVisualizationClasses()method
Request all visualization classes
getVisualizationClasses(options?: IGetVisualizationClassesOptions): Promise<IVisualizationClass[]>;
Parameters
Parameter | Type | Description |
|---|---|---|
options | (Optional) specify additional options |
Returns
Promise<IVisualizationClass[]>
promise of visualization classes
IWorkspaceInsightsService.setCertification()method
Sets insight certification metadata.
setCertification(ref: ObjRef, certification?: IObjectCertificationWrite): Promise<void>;
Parameters
Parameter | Type | Description |
|---|---|---|
ref | insight reference | |
certification | IObjectCertificationWrite | (Optional) certification state; undefined clears certification |
Returns
Promise<void>
IWorkspaceInsightsService.updateInsight()method
Update provided insight
updateInsight(insight: IInsight): Promise<IInsight>;
Parameters
Parameter | Type | Description |
|---|---|---|
insight | insight to update |
Returns
Promise<IInsight>
promise of updated insight
IWorkspaceInsightsService.updateInsightMeta()method
Update metadata object for the insight
updateInsightMeta(insight: Partial<IMetadataObjectBase> & IMetadataObjectIdentity): Promise<IInsight>;
Parameters
Parameter | Type | Description |
|---|---|---|
insight | Partial<IMetadataObjectBase> & IMetadataObjectIdentity | metadata object to update |
Returns
Promise<IInsight>
promise of updated measure