Building the API client library requires Maven to be installed.
To install the API client library to your local Maven repository, simply execute:
mvn install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn deploy
Refer to the official documentation for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>com.microsoft</groupId>
<artifactId>microsoft-powerbi-client</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
compile "com.microsoft:microsoft-powerbi-client:1.0.0"
At first generate the JAR by executing:
mvn package
Then manually install the following JARs:
- target/microsoft-powerbi-client-1.0.0.jar
- target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
import com.microsoft.powerbi.*;
import com.microsoft.powerbi.auth.*;
import com.microsoft.powerbi.models.*;
import com.microsoft.powerbi.api.DashboardsApi;
import java.io.File;
import java.util.*;
public class DashboardsApiExample {
public static void main(String[] args) {
DashboardsApi apiInstance = new DashboardsApi();
AddDashboardRequest requestParameters = new AddDashboardRequest(); // AddDashboardRequest | Add dashboard parameters
try {
Dashboard result = apiInstance.addDashboard(requestParameters);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DashboardsApi#addDashboard");
e.printStackTrace();
}
}
}
All URIs are relative to https://api.powerbi.com
Class | Method | HTTP request | Description |
---|---|---|---|
DashboardsApi | addDashboard | POST /v1.0/myorg/dashboards | Add a new empty dashboard |
DashboardsApi | addDashboardInGroup | POST /v1.0/myorg/groups/{groupId}/dashboards | Add a new empty dashboard |
DashboardsApi | generateToken | POST /v1.0/myorg/dashboards/{dashboardKey}/GenerateToken | Generate token to view the specified dashboard |
DashboardsApi | generateTokenInGroup | POST /v1.0/myorg/groups/{groupId}/dashboards/{dashboardKey}/GenerateToken | Generate token to view the specified dashboard |
DashboardsApi | getDashboards | GET /v1.0/myorg/dashboards | Gets a list of dashboards |
DashboardsApi | getDashboardsInGroup | GET /v1.0/myorg/groups/{groupId}/dashboards | Gets a list of dashboards in a group |
DatasetsApi | bindToGateway | POST /v1.0/myorg/datasets/{datasetKey}/Default.BindToGateway | Bind dataset to gateway |
DatasetsApi | bindToGatewayInGroup | POST /v1.0/myorg/groups/{groupId}/datasets/{datasetKey}/Default.BindToGateway | Bind dataset to gateway |
DatasetsApi | deleteDatasetById | DELETE /v1.0/myorg/datasets/{datasetKey} | Deletes the dataset with the specified id |
DatasetsApi | deleteDatasetByIdInGroup | DELETE /v1.0/myorg/groups/{groupId}/datasets/{datasetKey} | Deletes the dataset with the specified id |
DatasetsApi | deleteRows | DELETE /v1.0/myorg/datasets/{datasetKey}/tables/{tableName}/rows | Deletes all rows from the specified table |
DatasetsApi | deleteRowsInGroup | DELETE /v1.0/myorg/groups/{groupId}/datasets/{datasetKey}/tables/{tableName}/rows | Deletes all rows from the specified table |
DatasetsApi | generateTokenInGroup | POST /v1.0/myorg/groups/{groupId}/datasets/{datasetKey}/GenerateToken | Generate token to view the specified dataset |
DatasetsApi | getDatasetById | GET /v1.0/myorg/datasets/{datasetKey} | Gets the dataset metadata for the specifeid dataset id |
DatasetsApi | getDatasetByIdInGroup | GET /v1.0/myorg/groups/{groupId}/datasets/{datasetKey} | Gets the dataset metadata for the specifeid dataset id |
DatasetsApi | getDatasets | GET /v1.0/myorg/datasets | Returns the datasets |
DatasetsApi | getDatasetsInGroup | GET /v1.0/myorg/groups/{groupId}/datasets | Returns the datasets |
DatasetsApi | getDatasources | GET /v1.0/myorg/datasets/{datasetKey}/datasources | Gets a list of datasource for the specified dataset |
DatasetsApi | getDatasourcesInGroup | GET /v1.0/myorg/groups/{groupId}/datasets/{datasetKey}/datasources | Gets a list of datasource for the specified dataset |
DatasetsApi | getGatewayDatasources | GET /v1.0/myorg/datasets/{datasetKey}/Default.GetBoundGatewayDatasources | Gets a list of bound gateway datasources for the specified dataset |
DatasetsApi | getGatewayDatasourcesInGroup | GET /v1.0/myorg/groups/{groupId}/datasets/{datasetKey}/Default.GetBoundGatewayDatasources | Gets a list of bound gateway datasources for the specified dataset |
DatasetsApi | getRefreshHistory | GET /v1.0/myorg/datasets/{datasetKey}/refreshes | Gets the dataset refresh history |
DatasetsApi | getRefreshHistoryInGroup | GET /v1.0/myorg/groups/{groupId}/datasets/{datasetKey}/refreshes | Gets the dataset refresh history |
DatasetsApi | getTables | GET /v1.0/myorg/datasets/{datasetKey}/tables | Gets all tables within the specified dataset |
DatasetsApi | getTablesInGroup | GET /v1.0/myorg/groups/{groupId}/datasets/{datasetKey}/tables | Gets all tables within the specified dataset |
DatasetsApi | postDataset | POST /v1.0/myorg/datasets | Post a new entity to datasets |
DatasetsApi | postDatasetInGroup | POST /v1.0/myorg/groups/{groupId}/datasets | Post a new entity to datasets |
DatasetsApi | postRows | POST /v1.0/myorg/datasets/{datasetKey}/tables/{tableName}/rows | Posts new data rows into the specified table |
DatasetsApi | postRowsInGroup | POST /v1.0/myorg/groups/{groupId}/datasets/{datasetKey}/tables/{tableName}/rows | Posts new data rows into the specified table |
DatasetsApi | putTable | PUT /v1.0/myorg/datasets/{datasetKey}/tables/{tableName} | Updates a schema and metadata for the specified table |
DatasetsApi | putTableInGroup | PUT /v1.0/myorg/groups/{groupId}/datasets/{datasetKey}/tables/{tableName} | Updates a schema and metadata for the specified table |
DatasetsApi | refreshDataset | POST /v1.0/myorg/datasets/{datasetKey}/refreshes | Start a dataset refresh |
DatasetsApi | refreshDatasetInGroup | POST /v1.0/myorg/groups/{groupId}/datasets/{datasetKey}/refreshes | Start a dataset refresh |
DatasetsApi | setAllDatasetConnections | POST /v1.0/myorg/datasets/{datasetKey}/Default.SetAllConnections | Sets all connections for the specified dataset |
DatasetsApi | setAllDatasetConnectionsInGroup | POST /v1.0/myorg/groups/{groupId}/datasets/{datasetKey}/Default.SetAllConnections | Sets all connections for the specified dataset |
DatasetsApi | takeOverInGroup | POST /v1.0/myorg/groups/{groupId}/datasets/{datasetKey}/Default.TakeOver | Take Over a dataset |
DatasourcesApi | addDatasourceUser | POST /v1.0/myorg/gateways/{gatewayId}/datasources/{datasourceId}/users | Get a datasource user |
DatasourcesApi | createDatasource | POST /v1.0/myorg/gateways/{gatewayId}/datasources | Create a datasource |
DatasourcesApi | deleteDatasource | DELETE /v1.0/myorg/gateways/{gatewayId}/datasources/{datasourceId} | Delete a datasource |
DatasourcesApi | deleteDatasourceUser | DELETE /v1.0/myorg/gateways/{gatewayId}/datasources/{datasourceId}/users/{emailAdress} | Delete a datasource user |
DatasourcesApi | getDatasourceById | GET /v1.0/myorg/gateways/{gatewayId}/datasources/{datasourceId} | Get a datasource by id |
DatasourcesApi | getDatasourceStatusById | GET /v1.0/myorg/gateways/{gatewayId}/datasources/{datasourceId}/status | Get a datasource status by id |
DatasourcesApi | getDatasourceUsers | GET /v1.0/myorg/gateways/{gatewayId}/datasources/{datasourceId}/users | Get a datasource users list |
DatasourcesApi | getDatasources | GET /v1.0/myorg/gateways/{gatewayId}/datasources | Get all datasources of specific gateway |
DatasourcesApi | updateDatasource | PATCH /v1.0/myorg/gateways/{gatewayId}/datasources/{datasourceId} | Update a datasource credentials |
GatewaysApi | getGatewayById | GET /v1.0/myorg/gateways/{gatewayId} | Returns the specified gateway |
GatewaysApi | getGateways | GET /v1.0/myorg/gateways | Returns a list of gateways |
GroupsApi | addGroupUser | POST /v1.0/myorg/groups/{groupId}/users | Add a group user |
GroupsApi | createGroup | POST /v1.0/myorg/groups | Create new group |
GroupsApi | deleteGroup | DELETE /v1.0/myorg/groups/{groupId} | Deletes the specified group |
GroupsApi | deleteUserInGroup | DELETE /v1.0/myorg/groups/{groupId}/users/{user} | Deletes the specified group |
GroupsApi | getGroupUsers | GET /v1.0/myorg/groups/{groupId}/users | Get a group users list |
GroupsApi | getGroups | GET /v1.0/myorg/groups | Returns a list of groups |
ImportsApi | getImportById | GET /v1.0/myorg/imports/{importId} | Gets the import metadata for the specifed import id |
ImportsApi | getImportByIdInGroup | GET /v1.0/myorg/groups/{groupId}/imports/{importId} | Gets the import metadata for the specifed import id |
ImportsApi | getImports | GET /v1.0/myorg/imports | Returns a list of imports |
ImportsApi | getImportsInGroup | GET /v1.0/myorg/groups/{groupId}/imports | Returns a list of imports for the specified group |
ImportsApi | postImport | POST /v1.0/myorg/imports | Creates a new import using the specified import info |
ImportsApi | postImportInGroup | POST /v1.0/myorg/groups/{groupId}/imports | Creates a new import using the specified import info |
ReportsApi | cloneReport | POST /v1.0/myorg/reports/{reportKey}/Clone | Clones the specified report |
ReportsApi | cloneReportInGroup | POST /v1.0/myorg/groups/{groupId}/reports/{reportKey}/Clone | Clones the specified report |
ReportsApi | deleteReport | DELETE /v1.0/myorg/reports/{reportKey} | Deletes the specified report |
ReportsApi | deleteReportInGroup | DELETE /v1.0/myorg/groups/{groupId}/reports/{reportKey} | Deletes the specified report |
ReportsApi | exportReport | GET /v1.0/myorg/reports/{reportKey}/Export | Exports the specified report |
ReportsApi | exportReportInGroup | GET /v1.0/myorg/groups/{groupId}/reports/{reportKey}/Export | Exports the specified report |
ReportsApi | generateToken | POST /v1.0/myorg/reports/{reportKey}/GenerateToken | Generate token to view or edit the specified report |
ReportsApi | generateTokenForCreate | POST /v1.0/myorg/reports/GenerateToken | Generate token to create a new report on a given dataset |
ReportsApi | generateTokenForCreateInGroup | POST /v1.0/myorg/groups/{groupId}/reports/GenerateToken | Generate token to create a new report on a given dataset |
ReportsApi | generateTokenInGroup | POST /v1.0/myorg/groups/{groupId}/reports/{reportKey}/GenerateToken | Generate token to view or edit the specified report |
ReportsApi | getDashboard | POST /v1.0/myorg/dashboards/{dashboardKey} | Get the specified dashboard |
ReportsApi | getReport | GET /v1.0/myorg/reports/{reportKey} | Get the specified report |
ReportsApi | getReportInGroup | GET /v1.0/myorg/groups/{groupId}/reports/{reportKey} | Get the specified report |
ReportsApi | getReports | GET /v1.0/myorg/reports | Gets a list of reports |
ReportsApi | getReportsInGroup | GET /v1.0/myorg/groups/{groupId}/reports | Gets a list of reports available within the specified group |
ReportsApi | rebindReport | POST /v1.0/myorg/reports/{reportKey}/Rebind | Rebinds the specified report to requested dataset id |
ReportsApi | rebindReportInGroup | POST /v1.0/myorg/groups/{groupId}/reports/{reportKey}/Rebind | Rebinds the specified report to requested dataset id |
TilesApi | cloneTile | POST /v1.0/myorg/dashboards/{dashboardKey}/tiles/{tileKey}/Clone | Clones the specified tile |
TilesApi | cloneTileInGroup | POST /v1.0/myorg/groups/{groupId}/dashboards/{dashboardKey}/tiles/{tileKey}/Clone | Clones the specified tile |
TilesApi | generateToken | POST /v1.0/myorg/dashboards/{dashboardKey}/tiles/{tileKey}/GenerateToken | Generate token to view the specified tile |
TilesApi | generateTokenInGroup | POST /v1.0/myorg/groups/{groupId}/dashboards/{dashboardKey}/tiles/{tileKey}/GenerateToken | Generate token to view the specified tile |
TilesApi | getTile | GET /v1.0/myorg/dashboards/{dashboardKey}/tiles/{tileKey} | Get a specified tile in a specified dashboard |
TilesApi | getTileInGroup | GET /v1.0/myorg/groups/{groupId}/dashboards/{dashboardKey}/tiles/{tileKey} | Get a specified tile in a specified dashboard in a group |
TilesApi | getTiles | GET /v1.0/myorg/dashboards/{dashboardKey}/tiles | Get tiles in the specified dashboard |
TilesApi | getTilesInGroup | GET /v1.0/myorg/groups/{groupId}/dashboards/{dashboardKey}/tiles | Get tiles in the specified dashboard in a group |
- AddDashboardRequest
- BasicCredentials
- BindToGatewayRequest
- CloneReportRequest
- CloneTileRequest
- Column
- ConnectionDetails
- CredentialDetails
- Dashboard
- Dataset
- Datasource
- EffectiveIdentity
- EmbedToken
- Gateway
- GatewayDatasource
- GatewayPublicKey
- GenerateTokenRequest
- Group
- GroupCreationRequest
- GroupUser
- GroupUserAccessRight
- ImportInfo
- ModelImport
- ODataResponseListDashboard
- ODataResponseListDataset
- ODataResponseListDatasource
- ODataResponseListGateway
- ODataResponseListGatewayDatasource
- ODataResponseListGroup
- ODataResponseListGroupUserAccessRight
- ODataResponseListImport
- ODataResponseListRefresh
- ODataResponseListReport
- ODataResponseListTable
- ODataResponseListTile
- ODataResponseListUserAccessRight
- Object
- PublishDatasourceToGatewayRequest
- RebindReportRequest
- Refresh
- Report
- Row
- Table
- Tile
- UpdateDatasourceRequest
- UserAccessRight
All endpoints do not require authorization. Authentication schemes defined for the API:
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.