Example #1
0
 /// <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.
 /// &lt;br/&gt;&lt;br/&gt;**Required scope**: Dashboard.ReadWrite.All or
 /// Dashboard.Read.All &lt;br/&gt;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());
 }
Example #2
0
 /// <summary>
 /// Creates a new empty dashboard on the specified workspace.
 /// </summary>
 /// <remarks>
 /// &lt;br/&gt;**Required scope**: Content.Create &lt;br/&gt;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());
 }
Example #3
0
 /// <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.
 /// &lt;br/&gt;&lt;br/&gt;**Required scope**: Dashboard.ReadWrite.All or
 /// Dashboard.Read.All &lt;br/&gt;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());
 }
Example #4
0
 /// <summary>
 /// Returns a list of dashboards from the specified workspace.
 /// </summary>
 /// <remarks>
 /// &lt;br/&gt;**Required scope**: Dashboard.ReadWrite.All or
 /// Dashboard.Read.All &lt;br/&gt;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());
 }
Example #5
0
 /// <summary>
 /// Returns a list of dashboards from the specified workspace.
 /// </summary>
 /// <remarks>
 /// &lt;br/&gt;**Required scope**: Dashboard.ReadWrite.All or
 /// Dashboard.Read.All &lt;br/&gt;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);
     }
 }
Example #6
0
 /// <summary>
 /// Returns a list of dashboards from **"My Workspace"**.
 /// </summary>
 /// <remarks>
 /// &lt;br/&gt;**Required scope**: Dashboard.ReadWrite.All or
 /// Dashboard.Read.All &lt;br/&gt;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());
 }
Example #7
0
 /// <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());
 }
Example #8
0
 /// <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.
 /// &lt;br/&gt;&lt;br/&gt;**Required scope**: Dashboard.ReadWrite.All or
 /// Dashboard.Read.All &lt;br/&gt;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());
 }
Example #9
0
 /// <summary>
 /// Clones the specified tile from **"My Workspace"**.
 /// </summary>
 /// <remarks>
 /// &lt;br/&gt;If target report id and target dataset are not specified, the
 /// following can occur:&lt;li&gt;When a tile clone is performed within the
 /// same workspace, the report and dataset links will be cloned from the source
 /// tile.&lt;/li&gt;&lt;li&gt;When cloning a tile within a different workspace,
 /// report and dataset links will be rested, and the tile will be
 /// broken.&lt;/li&gt;&lt;br/&gt;**Required scope**: Dashboard.ReadWrite.All
 /// &lt;br/&gt;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());
 }
Example #10
0
 /// <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.
 /// &lt;br/&gt;&lt;br/&gt;**Required scope**: Dashboard.ReadWrite.All or
 /// Dashboard.Read.All &lt;br/&gt;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());
 }
Example #11
0
 /// <summary>
 /// Returns the specified dashboard from **"My Workspace"**.
 /// </summary>
 /// <remarks>
 /// &lt;br/&gt;**Required scope**: Dashboard.ReadWrite.All or
 /// Dashboard.Read.All &lt;br/&gt;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());
 }
Example #13
0
 /// <summary>
 /// Returns a list of dashboards from the specified workspace for an
 /// organization with an administrative scope.
 /// </summary>
 /// <remarks>
 /// &lt;br/&gt;**Required scope**: Tenant.Read.All or
 /// Tenant.ReadWrite.All&lt;br/&gt;Application only and delegated permissions
 /// are supported.&lt;br/&gt;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);
     }
 }
Example #14
0
 /// <summary>
 /// Returns a list of dashboards from the specified workspace for an
 /// organization with an administrative scope.
 /// </summary>
 /// <remarks>
 /// &lt;br/&gt;**Required scope**: Tenant.Read.All or
 /// Tenant.ReadWrite.All&lt;br/&gt;Application only and delegated permissions
 /// are supported.&lt;br/&gt;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());
 }