Microsoft Power BI Component
Interact with and modify Power BI datasets
Component key: ms-power-bi
Description
Microsoft Power BI is a Microsoft data visualization and business analytics service. This component allows you to interact with datasets and update data schemas.
Connections
OAuth 2.0
The Microsoft Power BI component authenticates requests through the Microsoft Graph API. To configure OAuth 2.0 you must first create an application through Active Directory in the Microsoft Azure portal. For more information regarding authenticating against the Microsoft Graph API refer to Microsoft's documentation.
Next, supply the following values to the OAuth 2.0 connection in your integration within Prismatic:
- For Client ID and Client Secret enter the values that you got from the Microsoft Azure Portal.
- For Scopes choose from the options found on the Microsoft Graph API documentation
- For Authorize URL and Token URL you will need to identify your Azure Tenant ID to include in the URLs or configure your app for multi-tenant which allows using the
common
endpoints.
Refer to the Microsoft Power BI REST API documentation for more information.
Input | Default | Notes |
---|---|---|
Authorize URL string / Required authorizeUrl | https://login.microsoftonline.com/common/oauth2/authorize | The OAuth 2.0 Authorization URL for Microsoft Power BI |
Client ID string / Required clientId | Generate at https://dev.powerbi.com/apps | |
Client Secret password / Required clientSecret | Generate at https://dev.powerbi.com/apps | |
Scopes string scopes | https://analysis.windows.net/powerbi/api/Dataset.ReadWrite.All | Microsoft Power BI permission scopes must also be set on the OAuth application |
Token URL string / Required tokenUrl | https://login.microsoftonline.com/common/oauth2/v2.0/token | The OAuth 2.0 Token URL for Microsoft Power BI |
Actions
Create Dataset
Creates a new dataset on 'My Workspace' | key: createDataset
Input | Default | Notes | Example |
---|---|---|---|
Columns code / Required columns | |||
Connection connection / Required connection | |||
Dataset Name string / Required datasetName | Provide a string value for the name of the database you want to interact with. | MyDatabase | |
Table Name string / Required tableName |
Create Rows
Adds new data rows to the specified table within the specified dataset from 'My Workspace' | key: createRow
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Dataset ID string / Required datasetId | A dataset is a spreadsheet like document that can be used to generate reports and visuals in Power BI. Datasets must be 'Push' datasets to be accessible via API. | myExampleDataset | |
Rows code / Required rows | |||
Table Name string / Required tableName |
Delete Rows
Deletes all rows from the specified table within the specified dataset from 'My Workspace' | key: deleteRows
Input | Notes | Example |
---|---|---|
Connection connection / Required connection | ||
Dataset ID string / Required datasetId | A dataset is a spreadsheet like document that can be used to generate reports and visuals in Power BI. Datasets must be 'Push' datasets to be accessible via API. | myExampleDataset |
Table Name string / Required tableName |
List Datasets
Returns a list of datasets from 'My Workspace' | key: listDatasets
Input | Notes | Example |
---|---|---|
Connection connection / Required connection | ||
Page Offset string skipToken | Provide an integer value for the page offset for the given object's results. | 3 |
Top string top | Provide an integer value for the maximum amount of results that will be returned. Provide a value from 1 to 1000. | 20 |
List Groups
Returns a list of workspaces the user has access to | key: listGroups
Input | Notes | Example |
---|---|---|
Connection connection / Required connection | ||
Page Offset string skipToken | Provide an integer value for the page offset for the given object's results. | 3 |
Top string top | Provide an integer value for the maximum amount of results that will be returned. Provide a value from 1 to 1000. | 20 |
List Reports
Returns a list of reports from 'My Workspace' | key: listReports
Input | Notes | Example |
---|---|---|
Connection connection / Required connection | ||
Page Offset string skipToken | Provide an integer value for the page offset for the given object's results. | 3 |
Top string top | Provide an integer value for the maximum amount of results that will be returned. Provide a value from 1 to 1000. | 20 |
List Tables
Returns a list of tables tables within the specified dataset from 'My Workspace' | key: listTables
Input | Notes | Example |
---|---|---|
Connection connection / Required connection | ||
Dataset ID string / Required datasetId | A dataset is a spreadsheet like document that can be used to generate reports and visuals in Power BI. Datasets must be 'Push' datasets to be accessible via API. | myExampleDataset |
Page Offset string skipToken | Provide an integer value for the page offset for the given object's results. | 3 |
Top string top | Provide an integer value for the maximum amount of results that will be returned. Provide a value from 1 to 1000. | 20 |
Raw Request
Send raw HTTP request to Microsoft Power BI | key: rawRequest
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Data string data | The HTTP body payload to send to the URL. | {"exampleKey": "Example Data"} | |
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
File Data string Key Value List fileData | File Data to be sent as a multipart form upload. | [{key: "example.txt", value: "My File Contents"}] | |
Form Data string Key Value List formData | The Form Data to be sent as a multipart form upload. | [{"key": "Example Key", "value": new Buffer("Hello World")}] | |
Header string Key Value List headers | A list of headers to send with the request. | User-Agent: curl/7.64.1 | |
Max Retry Count string maxRetries | 0 | The maximum number of retries to attempt. | |
Method string / Required method | The HTTP method to use. | ||
Query Parameter string Key Value List queryParams | A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2. | ||
Response Type string / Required responseType | json | The type of data you expect in the response. You can request json, text, or binary data. | |
Retry On All Errors boolean retryAllErrors | false | If true, retries on all erroneous responses regardless of type. | |
Retry Delay (ms) string retryDelayMS | 0 | The delay in milliseconds between retries. | |
Timeout string timeout | The maximum time that a client will await a response to its request | 2000 | |
URL string / Required url | /imports | Input the path only (/profiles), The base URL is already included (https://api.powerbi.com/v1.0/myorg). For example, to connect to https://api.powerbi.com/v1.0/myorg/profiles, only /profiles is entered in this field. | /profiles |
Use Exponential Backoff boolean useExponentialBackoff | false | Specifies whether to use a pre-defined exponential backoff strategy for retries. |
Update Table
Updates the metadata and schema for the specified table within the specified dataset from 'My Workspace' | key: updateTable
Input | Default | Notes | Example |
---|---|---|---|
Columns code / Required columns | |||
Connection connection / Required connection | |||
Dataset ID string / Required datasetId | A dataset is a spreadsheet like document that can be used to generate reports and visuals in Power BI. Datasets must be 'Push' datasets to be accessible via API. | myExampleDataset | |
Table Name string / Required tableName |