Share via


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, any)

Given an HTML element and entityType, creates a new component instance, and bootstrap the iframe for embedding.

createReport(HTMLElement, any)

Creates new report

embed(HTMLElement, any)

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.

invokeSDKHook(Function, IExtendedRequest, Response)
load(HTMLElement, any)

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(any, HTMLElement)

API for warm starting powerbi embedded endpoints. Use this API to preload Power BI Embedded in the background.

quickCreate(HTMLElement, IQuickCreateConfiguration)

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, any)

Given an HTML element and entityType, creates a new component instance, and bootstrap the iframe for embedding.

function bootstrap(element: HTMLElement, config: any): Embed

Parameters

element

HTMLElement

config

any

Returns

Embed

createReport(HTMLElement, any)

Creates new report

function createReport(element: HTMLElement, config?: any): Embed

Parameters

element

HTMLElement

config

any

Returns

Embed

embed(HTMLElement, any)

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?: any): Embed

Parameters

element

HTMLElement

config

any

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, any)

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?: any): Embed

Parameters

element

HTMLElement

config

any

Returns

Embed

preload(any, HTMLElement)

API for warm starting powerbi embedded endpoints. Use this API to preload Power BI Embedded in the background.

function preload(config?: any, element?: HTMLElement): HTMLIFrameElement

Parameters

config

any

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