Service class
The Power BI Service embed component, which is the entry point to embed all other Power BI components into your application
Properties
router |
Methods
bootstrap(HTMLElement, IBootstrap |
Given an HTML element and entityType, creates a new component instance, and bootstrap the iframe for embedding. |
create |
Creates new report |
embed(HTMLElement, IEmbed |
Given a configuration based on an HTML element, if the component has already been created and attached to the element, reuses the component instance and existing iframe, otherwise creates a new component instance. |
get(HTMLElement) | Returns an instance of the component associated with the element. |
invoke |
|
load(HTMLElement, IEmbed |
Given a configuration based on an HTML element, if the component has already been created and attached to the element, reuses the component instance and existing iframe, otherwise creates a new component instance. This is used for the phased embedding API, once element is loaded successfully, one can call 'render' on it. |
preload(IEmbed |
API for warm starting powerbi embedded endpoints. Use this API to preload Power BI Embedded in the background. |
quick |
Creates new dataset |
reset(HTMLElement) | Given an HTML element that has a component embedded within it, removes the component from the list of embedded components, removes the association between the element and the component, and removes the iframe. |
Property Details
router
router: Router
Property Value
Router
Method Details
bootstrap(HTMLElement, IBootstrapEmbedConfiguration | IComponentEmbedConfiguration)
Given an HTML element and entityType, creates a new component instance, and bootstrap the iframe for embedding.
function bootstrap(element: HTMLElement, config: IBootstrapEmbedConfiguration | IComponentEmbedConfiguration): Embed
Parameters
- element
-
HTMLElement
Returns
Embed
createReport(HTMLElement, IEmbedConfiguration | IReportCreateConfiguration)
Creates new report
function createReport(element: HTMLElement, config?: IEmbedConfiguration | IReportCreateConfiguration): Embed
Parameters
- element
-
HTMLElement
Returns
Embed
embed(HTMLElement, IEmbedConfigurationBase | IComponentEmbedConfiguration)
Given a configuration based on an HTML element, if the component has already been created and attached to the element, reuses the component instance and existing iframe, otherwise creates a new component instance.
function embed(element: HTMLElement, config?: IEmbedConfigurationBase | IComponentEmbedConfiguration): Embed
Parameters
- element
-
HTMLElement
Returns
Embed
get(HTMLElement)
Returns an instance of the component associated with the element.
function get(element: HTMLElement): Embed
Parameters
- element
-
HTMLElement
Returns
Embed
invokeSDKHook(Function, IExtendedRequest, Response)
function invokeSDKHook(hook: Function, req: IExtendedRequest, res: Response): Promise<void>
Parameters
- hook
-
Function
- req
-
IExtendedRequest
- res
-
Response
Returns
Promise<void>
load(HTMLElement, IEmbedConfigurationBase | IComponentEmbedConfiguration)
Given a configuration based on an HTML element, if the component has already been created and attached to the element, reuses the component instance and existing iframe, otherwise creates a new component instance. This is used for the phased embedding API, once element is loaded successfully, one can call 'render' on it.
function load(element: HTMLElement, config?: IEmbedConfigurationBase | IComponentEmbedConfiguration): Embed
Parameters
- element
-
HTMLElement
Returns
Embed
preload(IEmbedConfigurationBase | IComponentEmbedConfiguration, HTMLElement)
API for warm starting powerbi embedded endpoints. Use this API to preload Power BI Embedded in the background.
function preload(config?: IEmbedConfigurationBase | IComponentEmbedConfiguration, element?: HTMLElement): HTMLIFrameElement
Parameters
- element
-
HTMLElement
Returns
HTMLIFrameElement
quickCreate(HTMLElement, IQuickCreateConfiguration)
Creates new dataset
function quickCreate(element: HTMLElement, config?: IQuickCreateConfiguration): Embed
Parameters
- element
-
HTMLElement
- config
- IQuickCreateConfiguration
Returns
Embed
reset(HTMLElement)
Given an HTML element that has a component embedded within it, removes the component from the list of embedded components, removes the association between the element and the component, and removes the iframe.
function reset(element: HTMLElement)
Parameters
- element
-
HTMLElement