/// <summary>
 /// Creates a new empty dashboard on **"My 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='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.
 /// &lt;br/&gt;This API allows 200 requests per hour at maximum.
 /// &lt;br/&gt;&lt;br/&gt;**Required scope**: Tenant.Read.All or
 /// Tenant.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='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.
 /// &lt;br/&gt;This API allows 200 requests per hour at maximum.
 /// &lt;br/&gt;&lt;br/&gt;**Required scope**: Tenant.Read.All or
 /// Tenant.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='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.&lt;br/&gt;This API is relevant only to ['App owns data' embed
 /// scenario](https://docs.microsoft.com/power-bi/developer/embed-sample-for-customers).
 /// </summary>
 /// <remarks>
 /// &lt;br/&gt;**Required scope**: (all of the below)
 /// &lt;ul&gt;&lt;li&gt;Dashboard.ReadWrite.All or
 /// Dashboard.Read.All&lt;/li&gt;&lt;li&gt;Report.ReadWrite.All or
 /// Report.Read.All &lt;/li&gt;&lt;li&gt;Dataset.ReadWrite.All or
 /// Dataset.Read.All&lt;/li&gt;&lt;/ul&gt; &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='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>
 /// &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='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>
 /// &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='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);
     }
 }
예제 #7
0
 /// <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>
 /// &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='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>
 /// &lt;br/&gt;If target report id and target dataset are missing, 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;If you are cloning a tile within a different
 /// workspace, report and dataset links will be rested. The tile will be
 /// broken.&lt;/li&gt;&lt;br/&gt;**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.&lt;br/&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='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.
 /// &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='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>
 /// &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 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>
 /// &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 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. &lt;br/&gt;This API allows 200 requests
 /// per hour at maximum. &lt;br/&gt;&lt;br/&gt;**Required scope**:
 /// Tenant.Read.All or Tenant.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='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.&lt;br/&gt;&lt;br/&gt;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>
 /// &lt;br/&gt;**Required scope**: (all of the below)
 /// &lt;ul&gt;&lt;li&gt;Dashboard.ReadWrite.All or
 /// Dashboard.Read.All&lt;/li&gt;&lt;li&gt;Report.ReadWrite.All or
 /// Report.Read.All &lt;/li&gt;&lt;li&gt;Dataset.ReadWrite.All or
 /// Dataset.Read.All&lt;/li&gt;&lt;/ul&gt;To set the permissions scope, see
 /// [Register an
 /// app](https://docs.microsoft.com/power-bi/developer/register-app).&lt;/br&gt;&lt;/br&gt;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.
 /// &lt;br/&gt;This API allows 200 requests per hour at maximum.
 /// &lt;br/&gt;&lt;br/&gt;**Required scope**: Tenant.Read.All or
 /// Tenant.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='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>
 /// &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='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.
 /// &lt;br/&gt;This API allows 200 requests per hour at maximum.
 /// &lt;br/&gt;&lt;br/&gt;**Required scope**: Tenant.Read.All or
 /// Tenant.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='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>
 /// &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 Dashboards GetDashboards(this IDashboardsOperations operations)
 {
     return(operations.GetDashboardsAsync().GetAwaiter().GetResult());
 }