/// <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='dashboardKey'> /// The dashboard id /// </param> /// <param name='tileKey'> /// The tile id /// </param> public static Tile GetTileInGroup(this IDashboards operations, string groupId, string dashboardKey, string tileKey) { return(operations.GetTileInGroupAsync(groupId, dashboardKey, tileKey).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 IDashboards operations, string groupId, AddDashboardRequest requestParameters) { return(operations.AddDashboardInGroupAsync(groupId, requestParameters).GetAwaiter().GetResult()); }
/// <summary> /// Returns a list of tiles 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='dashboardKey'> /// The dashboard id /// </param> public static ODataResponseListTile GetTilesInGroup(this IDashboards operations, string groupId, string dashboardKey) { return(operations.GetTilesInGroupAsync(groupId, dashboardKey).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 ODataResponseListDashboard GetDashboardsInGroup(this IDashboards operations, string groupId) { return(operations.GetDashboardsInGroupAsync(groupId).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> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ODataResponseListDashboard> GetDashboardsInGroupAsync(this IDashboards operations, string groupId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetDashboardsInGroupWithHttpMessagesAsync(groupId, 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> public static ODataResponseListDashboard GetDashboards(this IDashboards operations) { return(operations.GetDashboardsAsync().GetAwaiter().GetResult()); }
/// <summary> /// This functionality is only available in a workspace context. Use /// [Dashboards /// GenerateTokenInGroup](/rest/api/power-bi/embedtoken/dashboards_generatetokeningroup). /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='dashboardKey'> /// The dashboard id /// </param> /// <param name='requestParameters'> /// Generate token parameters /// </param> public static EmbedToken GenerateToken(this IDashboards operations, string dashboardKey, GenerateTokenRequest requestParameters) { return(operations.GenerateTokenAsync(dashboardKey, requestParameters).GetAwaiter().GetResult()); }
/// <summary> /// Returns the specified tile within the specified dashboard from **"My /// 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='dashboardKey'> /// The dashboard id /// </param> /// <param name='tileKey'> /// The tile id /// </param> public static Tile GetTile(this IDashboards operations, string dashboardKey, string tileKey) { return(operations.GetTileAsync(dashboardKey, tileKey).GetAwaiter().GetResult()); }
/// <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='dashboardKey'> /// The dashboard id /// </param> /// <param name='tileKey'> /// The tile id /// </param> /// <param name='requestParameters'> /// Clone tile parameters /// </param> public static Tile CloneTile(this IDashboards operations, string dashboardKey, string tileKey, CloneTileRequest requestParameters) { return(operations.CloneTileAsync(dashboardKey, tileKey, requestParameters).GetAwaiter().GetResult()); }
/// <summary> /// Returns a list of tiles within the specified dashboard from **"My /// 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='dashboardKey'> /// The dashboard id /// </param> public static ODataResponseListTile GetTiles(this IDashboards operations, string dashboardKey) { return(operations.GetTilesAsync(dashboardKey).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='dashboardKey'> /// The dashboard id /// </param> public static Dashboard GetDashboard(this IDashboards operations, string dashboardKey) { return(operations.GetDashboardAsync(dashboardKey).GetAwaiter().GetResult()); }
/// <summary> /// Add a new empty dashboard /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='requestParameters'> /// Add dashboard parameters /// </param> public static Dashboard AddDashboard(this IDashboards operations, AddDashboardRequest requestParameters) { return(operations.AddDashboardAsync(requestParameters).GetAwaiter().GetResult()); }
/// <summary> /// Returns a list of dashboards from the specified workspace for an /// organization with an administrative scope. /// </summary> /// <remarks> /// <br/>**Required scope**: Tenant.Read.All or /// Tenant.ReadWrite.All<br/>Application only and delegated permissions /// are supported.<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> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ODataResponseListDashboard> GetDashboardsAsAdminAsync(this IDashboards operations, string groupId, string filter = default(string), int?top = default(int?), int?skip = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetDashboardsInGroupAsAdminWithHttpMessagesAsync(groupId, filter, top, skip, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns a list of dashboards from the specified workspace for an /// organization with an administrative scope. /// </summary> /// <remarks> /// <br/>**Required scope**: Tenant.Read.All or /// Tenant.ReadWrite.All<br/>Application only and delegated permissions /// are supported.<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 ODataResponseListDashboard GetDashboardsAsAdmin(this IDashboards operations, string groupId, string filter = default(string), int?top = default(int?), int?skip = default(int?)) { return(operations.GetDashboardsInGroupAsAdminAsync(groupId, filter, top, skip).GetAwaiter().GetResult()); }