/// <summary> /// Creates a new empty dashboard on **"My Workspace"**. /// </summary> /// <remarks> /// <br/>**Required scope**: Content.Create <br/>To set the /// permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='requestParameters'> /// Add dashboard parameters /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Dashboard> AddDashboardAsync(this IDashboardsOperations operations, AddDashboardRequest requestParameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.AddDashboardWithHttpMessagesAsync(requestParameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns a list of dashboards for the organization. /// </summary> /// <remarks> /// **Note:** The user must have administrator rights (such as Office 365 /// Global Administrator or Power BI Service Administrator) to call this API. /// <br/>This API allows 200 requests per hour at maximum. /// <br/><br/>**Required scope**: Tenant.Read.All or /// Tenant.ReadWrite.All<br/>To set the permissions scope, see [Register /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='expand'> /// Expands related entities inline, receives a comma-separated list of data /// types. Supported: tiles /// </param> /// <param name='filter'> /// Filters the results, based on a boolean condition /// </param> /// <param name='top'> /// Returns only the first n results /// </param> /// <param name='skip'> /// Skips the first n results /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Dashboards> GetDashboardsAsAdminAsync(this IDashboardsOperations operations, string expand = default(string), string filter = default(string), int?top = default(int?), int?skip = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetDashboardsAsAdminWithHttpMessagesAsync(expand, filter, top, skip, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns a list of tiles within the specified dashboard. /// </summary> /// <remarks> /// **Note:** The user must have administrator rights (such as Office 365 /// Global Administrator or Power BI Service Administrator) to call this API. /// <br/>This API allows 200 requests per hour at maximum. /// <br/><br/>**Required scope**: Tenant.Read.All or /// Tenant.ReadWrite.All<br/>To set the permissions scope, see [Register /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='dashboardId'> /// The dashboard id /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Tiles> GetTilesAsAdminAsync(this IDashboardsOperations operations, System.Guid dashboardId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetTilesAsAdminWithHttpMessagesAsync(dashboardId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Generates an embed token to view the specified dashboard from the specified /// workspace.<br/>This API is relevant only to ['App owns data' embed /// scenario](https://docs.microsoft.com/power-bi/developer/embed-sample-for-customers). /// </summary> /// <remarks> /// <br/>**Required scope**: (all of the below) /// <ul><li>Dashboard.ReadWrite.All or /// Dashboard.Read.All</li><li>Report.ReadWrite.All or /// Report.Read.All </li><li>Dataset.ReadWrite.All or /// Dataset.Read.All</li></ul> <br/>To set the permissions /// scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// The workspace id /// </param> /// <param name='dashboardId'> /// The dashboard id /// </param> /// <param name='requestParameters'> /// Generate token parameters /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <EmbedToken> GenerateTokenInGroupAsync(this IDashboardsOperations operations, System.Guid groupId, System.Guid dashboardId, GenerateTokenRequest requestParameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GenerateTokenInGroupWithHttpMessagesAsync(groupId, dashboardId, requestParameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns a list of dashboards from **"My Workspace"**. /// </summary> /// <remarks> /// <br/>**Required scope**: Dashboard.ReadWrite.All or /// Dashboard.Read.All <br/>To set the permissions scope, see [Register /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Dashboards> GetDashboardsAsync(this IDashboardsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetDashboardsWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Clones the specified tile from **"My Workspace"**. /// </summary> /// <remarks> /// <br/>If target report id and target dataset are not specified, the /// following can occur:<li>When a tile clone is performed within the /// same workspace, the report and dataset links will be cloned from the source /// tile.</li><li>When cloning a tile within a different workspace, /// report and dataset links will be rested, and the tile will be /// broken.</li><br/>**Required scope**: Dashboard.ReadWrite.All /// <br/>To set the permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='dashboardId'> /// The dashboard id /// </param> /// <param name='tileId'> /// The tile id /// </param> /// <param name='requestParameters'> /// Clone tile parameters /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Tile> CloneTileAsync(this IDashboardsOperations operations, System.Guid dashboardId, System.Guid tileId, CloneTileRequest requestParameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CloneTileWithHttpMessagesAsync(dashboardId, tileId, requestParameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get a specified tile in a specified dashboard in a group /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// The group id /// </param> /// <param name='dashboardId'> /// The dashboard id /// </param> /// <param name='tileId'> /// The tile id /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Tile> GetTileAsync(this IDashboardsOperations operations, Guid groupId, Guid dashboardId, Guid tileId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetTileInGroupWithHttpMessagesAsync(groupId, dashboardId, tileId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates a new empty dashboard on **"My Workspace"**. /// </summary> /// <remarks> /// <br/>**Required scope**: Content.Create <br/>To set the /// permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='requestParameters'> /// Add dashboard parameters /// </param> public static Dashboard AddDashboard(this IDashboardsOperations operations, AddDashboardRequest requestParameters) { return(operations.AddDashboardAsync(requestParameters).GetAwaiter().GetResult()); }
/// <summary> /// Clones the specified tile from the specified workspace. /// </summary> /// <remarks> /// <br/>If target report id and target dataset are missing, the /// following can occur:<li>When a tile clone is performed within the /// same workspace, the report and dataset links will be cloned from the source /// tile.</li><li>If you are cloning a tile within a different /// workspace, report and dataset links will be rested. The tile will be /// broken.</li><br/>**Note:** When a tile is cloned to another /// workspace and bound to another report and dataset, it is cloned as is with /// its underlying query containing the original report /// filters.<br/><br/>**Required scope**: Dashboard.ReadWrite.All /// <br/>To set the permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// The workspace id /// </param> /// <param name='dashboardId'> /// The dashboard id /// </param> /// <param name='tileId'> /// The tile id /// </param> /// <param name='requestParameters'> /// Clone tile parameters /// </param> public static Tile CloneTileInGroup(this IDashboardsOperations operations, System.Guid groupId, System.Guid dashboardId, System.Guid tileId, CloneTileRequest requestParameters) { return(operations.CloneTileInGroupAsync(groupId, dashboardId, tileId, requestParameters).GetAwaiter().GetResult()); }
/// <summary> /// Returns the specified tile within the specified dashboard from the /// specified workspace. /// </summary> /// <remarks> /// **Note**: All tile types are supported except for "model tiles", which /// include datasets and live tiles that contain an entire report page. /// <br/><br/>**Required scope**: Dashboard.ReadWrite.All or /// Dashboard.Read.All <br/>To set the permissions scope, see [Register /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// The workspace id /// </param> /// <param name='dashboardId'> /// The dashboard id /// </param> /// <param name='tileId'> /// The tile id /// </param> public static Tile GetTileInGroup(this IDashboardsOperations operations, System.Guid groupId, System.Guid dashboardId, System.Guid tileId) { return(operations.GetTileInGroupAsync(groupId, dashboardId, tileId).GetAwaiter().GetResult()); }
/// <summary> /// Creates a new empty dashboard on the specified workspace. /// </summary> /// <remarks> /// <br/>**Required scope**: Content.Create <br/>To set the /// permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// The workspace id /// </param> /// <param name='requestParameters'> /// Add dashboard parameters /// </param> public static Dashboard AddDashboardInGroup(this IDashboardsOperations operations, System.Guid groupId, AddDashboardRequest requestParameters) { return(operations.AddDashboardInGroupAsync(groupId, requestParameters).GetAwaiter().GetResult()); }
/// <summary> /// Returns a list of dashboards from the specified workspace. /// </summary> /// <remarks> /// <br/>**Required scope**: Dashboard.ReadWrite.All or /// Dashboard.Read.All <br/>To set the permissions scope, see [Register /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// The workspace id /// </param> public static Dashboards GetDashboardsInGroup(this IDashboardsOperations operations, System.Guid groupId) { return(operations.GetDashboardsInGroupAsync(groupId).GetAwaiter().GetResult()); }
/// <summary> /// Returns a list of dashboards for the organization. /// </summary> /// <remarks> /// **Note:** The user must have administrator rights (such as Office 365 /// Global Administrator or Power BI Service Administrator) to call this API or /// authenticate via service principal. <br/>This API allows 200 requests /// per hour at maximum. <br/><br/>**Required scope**: /// Tenant.Read.All or Tenant.ReadWrite.All<br/>To set the permissions /// scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='expand'> /// Expands related entities inline, receives a comma-separated list of data /// types. Supported: tiles /// </param> /// <param name='filter'> /// Filters the results, based on a boolean condition /// </param> /// <param name='top'> /// Returns only the first n results /// </param> /// <param name='skip'> /// Skips the first n results /// </param> public static Dashboards GetDashboardsAsAdmin(this IDashboardsOperations operations, string expand = default(string), string filter = default(string), int?top = default(int?), int?skip = default(int?)) { return(operations.GetDashboardsAsAdminAsync(expand, filter, top, skip).GetAwaiter().GetResult()); }
/// <summary> /// Get the specified dashboard in a group /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// The group id /// </param> /// <param name='dashboardId'> /// The dashboard id /// </param> public static Dashboard GetDashboard(this IDashboardsOperations operations, Guid groupId, Guid dashboardId) { return(operations.GetDashboardAsync(groupId, dashboardId).GetAwaiter().GetResult()); }
/// <summary> /// Generates an embed token to view the specified dashboard from the specified /// workspace.<br/><br/>This API is relevant only to the ['App owns /// data' embed /// scenario](https://docs.microsoft.com/power-bi/developer/embed-sample-for-customers). /// For more information about using this API, see [Considerations when /// generating an embed /// token](https://docs.microsoft.com/power-bi/developer/embedded/generate-embed-token). /// </summary> /// <remarks> /// <br/>**Required scope**: (all of the below) /// <ul><li>Dashboard.ReadWrite.All or /// Dashboard.Read.All</li><li>Report.ReadWrite.All or /// Report.Read.All </li><li>Dataset.ReadWrite.All or /// Dataset.Read.All</li></ul>To set the permissions scope, see /// [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app).</br></br>When /// using service principal for authentication, refer to [Service Principal /// with Power /// BI](https://docs.microsoft.com/power-bi/developer/embed-service-principal) /// document along with considerations and limitations section. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// The workspace id /// </param> /// <param name='dashboardId'> /// The dashboard id /// </param> /// <param name='requestParameters'> /// Generate token parameters /// </param> public static EmbedToken GenerateTokenInGroup(this IDashboardsOperations operations, System.Guid groupId, System.Guid dashboardId, GenerateTokenRequest requestParameters) { return(operations.GenerateTokenInGroupAsync(groupId, dashboardId, requestParameters).GetAwaiter().GetResult()); }
/// <summary> /// Returns a list of dashboards from the specified workspace. /// </summary> /// <remarks> /// **Note:** The user must have administrator rights (such as Office 365 /// Global Administrator or Power BI Service Administrator) to call this API. /// <br/>This API allows 200 requests per hour at maximum. /// <br/><br/>**Required scope**: Tenant.Read.All or /// Tenant.ReadWrite.All<br/>To set the permissions scope, see [Register /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// The workspace id /// </param> /// <param name='filter'> /// Filters the results, based on a boolean condition /// </param> /// <param name='top'> /// Returns only the first n results /// </param> /// <param name='skip'> /// Skips the first n results /// </param> public static Dashboards GetDashboardsInGroupAsAdmin(this IDashboardsOperations operations, System.Guid groupId, string filter = default(string), int?top = default(int?), int?skip = default(int?)) { return(operations.GetDashboardsInGroupAsAdminAsync(groupId, filter, top, skip).GetAwaiter().GetResult()); }
/// <summary> /// Returns the specified dashboard from **"My Workspace"**. /// </summary> /// <remarks> /// <br/>**Required scope**: Dashboard.ReadWrite.All or /// Dashboard.Read.All <br/>To set the permissions scope, see [Register /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='dashboardId'> /// The dashboard id /// </param> public static Dashboard GetDashboard(this IDashboardsOperations operations, System.Guid dashboardId) { return(operations.GetDashboardAsync(dashboardId).GetAwaiter().GetResult()); }
/// <summary> /// Returns a list of tiles within the specified dashboard. /// </summary> /// <remarks> /// **Note:** The user must have administrator rights (such as Office 365 /// Global Administrator or Power BI Service Administrator) to call this API. /// <br/>This API allows 200 requests per hour at maximum. /// <br/><br/>**Required scope**: Tenant.Read.All or /// Tenant.ReadWrite.All<br/>To set the permissions scope, see [Register /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='dashboardId'> /// The dashboard id /// </param> public static Tiles GetTilesAsAdmin(this IDashboardsOperations operations, System.Guid dashboardId) { return(operations.GetTilesAsAdminAsync(dashboardId).GetAwaiter().GetResult()); }
/// <summary> /// Returns a list of dashboards from **"My Workspace"**. /// </summary> /// <remarks> /// <br/>**Required scope**: Dashboard.ReadWrite.All or /// Dashboard.Read.All <br/>To set the permissions scope, see [Register /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static Dashboards GetDashboards(this IDashboardsOperations operations) { return(operations.GetDashboardsAsync().GetAwaiter().GetResult()); }