diff --git a/.pipelines/pipeline.user.windows.official.yml b/.pipelines/pipeline.user.windows.official.yml index bcaf0604..050a2f06 100644 --- a/.pipelines/pipeline.user.windows.official.yml +++ b/.pipelines/pipeline.user.windows.official.yml @@ -1,7 +1,7 @@ version: name: 'sdk version' major: 3 - minor: 23 + minor: 28 system: 'Buildrevision' exclude_commit: true assembly_version: 'majorminoronly' diff --git a/scripts/pack-sdk-dev.cmd b/scripts/pack-sdk-dev.cmd index 2c11033d..c7590129 100644 --- a/scripts/pack-sdk-dev.cmd +++ b/scripts/pack-sdk-dev.cmd @@ -11,7 +11,7 @@ if "%VERSION%"=="" SET VERSION=0.0.1111 echo ======================================== echo "Pack PowerBI.Api.csproj Release - AnyCPU..." echo ======================================== -call msbuild %~dp0..\sdk\PowerBI.Api\PowerBI.Api.csproj /t:pack /p:Configuration=Release /p:PackageVersion=%VERSION% /p:PackageOutputPath=%~dp0..\pack\Dev +call msbuild %~dp0..\sdk\PowerBI.Api\PowerBI.Api.csproj /t:pack /p:Configuration=Release /p:PackageVersion=%VERSION%-dev /p:PackageOutputPath=%~dp0..\pack\Dev set EX=%ERRORLEVEL% if "%EX%" neq "0" ( diff --git a/sdk/PowerBI.Api.Tests/ImportsTests.cs b/sdk/PowerBI.Api.Tests/ImportsTests.cs index 123d882b..d0634731 100644 --- a/sdk/PowerBI.Api.Tests/ImportsTests.cs +++ b/sdk/PowerBI.Api.Tests/ImportsTests.cs @@ -107,6 +107,76 @@ public async Task PostImportFileWithNameAndSkipReport() } } + [TestMethod] + public async Task PostImportFileWithNameAndNotOverrideReport() + { + var datasetDisplayName = "TestDataset"; + var importResponse = CreateSampleImportResponse(); + var overrideReportLabel = false; + + using (var handler = new FakeHttpClientHandler(importResponse)) + using (var client = CreatePowerBIClient(handler)) + using (var stream = new MemoryStream()) + { + await client.Imports.PostImportWithFileAsync(stream, datasetDisplayName, overrideReportLabel: overrideReportLabel); + var expectedRequesetUrl = $"https://api.powerbi.com/v1.0/myorg/imports?datasetDisplayName={datasetDisplayName}&overrideReportLabel={overrideReportLabel}"; + Assert.AreEqual(expectedRequesetUrl, handler.Request.RequestUri.ToString()); + } + } + + [TestMethod] + public async Task PostImportFileWithNameAndNotOverrideModel() + { + var datasetDisplayName = "TestDataset"; + var importResponse = CreateSampleImportResponse(); + var overrideModelLabel = false; + + using (var handler = new FakeHttpClientHandler(importResponse)) + using (var client = CreatePowerBIClient(handler)) + using (var stream = new MemoryStream()) + { + await client.Imports.PostImportWithFileAsync(stream, datasetDisplayName, overrideModelLabel: overrideModelLabel); + var expectedRequesetUrl = $"https://api.powerbi.com/v1.0/myorg/imports?datasetDisplayName={datasetDisplayName}&overrideModelLabel={overrideModelLabel}"; + Assert.AreEqual(expectedRequesetUrl, handler.Request.RequestUri.ToString()); + } + } + + [TestMethod] + public async Task PostImportFileWithNameAndNotOverrideLabels() + { + var datasetDisplayName = "TestDataset"; + var importResponse = CreateSampleImportResponse(); + var overrideReportLabel = false; + var overrideModelLabel = false; + + using (var handler = new FakeHttpClientHandler(importResponse)) + using (var client = CreatePowerBIClient(handler)) + using (var stream = new MemoryStream()) + { + await client.Imports.PostImportWithFileAsync(stream, datasetDisplayName, overrideReportLabel: overrideReportLabel, overrideModelLabel: overrideModelLabel); + var expectedRequesetUrl = $"https://api.powerbi.com/v1.0/myorg/imports?datasetDisplayName={datasetDisplayName}&overrideReportLabel={overrideReportLabel}&overrideModelLabel={overrideModelLabel}"; + Assert.AreEqual(expectedRequesetUrl, handler.Request.RequestUri.ToString()); + } + } + + [TestMethod] + public async Task PostImportFileWithNameAndOverrideLabels() + { + var datasetDisplayName = "TestDataset"; + var importResponse = CreateSampleImportResponse(); + var overrideReportLabel = true; + var overrideModelLabel = true; + + using (var handler = new FakeHttpClientHandler(importResponse)) + using (var client = CreatePowerBIClient(handler)) + using (var stream = new MemoryStream()) + { + await client.Imports.PostImportWithFileAsync(stream, datasetDisplayName, overrideReportLabel: overrideReportLabel, overrideModelLabel: overrideModelLabel); + var expectedRequesetUrl = $"https://api.powerbi.com/v1.0/myorg/imports?datasetDisplayName={datasetDisplayName}&overrideReportLabel={overrideReportLabel}&overrideModelLabel={overrideModelLabel}"; + Assert.AreEqual(expectedRequesetUrl, handler.Request.RequestUri.ToString()); + } + } + [TestMethod] public async Task PostImportWithFileWithNameAndConflictAndSkipReport() { diff --git a/sdk/PowerBI.Api/Extensions/ImportsOperationsExtensions.cs b/sdk/PowerBI.Api/Extensions/ImportsOperationsExtensions.cs index 31f5b757..808ffedd 100644 --- a/sdk/PowerBI.Api/Extensions/ImportsOperationsExtensions.cs +++ b/sdk/PowerBI.Api/Extensions/ImportsOperationsExtensions.cs @@ -66,9 +66,15 @@ public static Imports GetImports(this IImportsOperations operations, Guid groupI /// /// Determines whether to skip report import, if specified value must be 'true'. Only supported for PBIX files. /// - public static Import PostImport(this IImportsOperations operations, Guid groupId, string datasetDisplayName, ImportInfo importInfo, ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?)) + /// + /// Determines whether to override existing label on report during republish of PBIX file, service default value is true. + /// + /// + /// Determines whether to override existing label on model during republish of PBIX file, service default value is true. + /// + public static Import PostImport(this IImportsOperations operations, Guid groupId, string datasetDisplayName, ImportInfo importInfo, ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), bool? overrideReportLabel = default(bool?), bool? overrideModelLabel = default(bool?)) { - return operations.PostImportAsync(groupId, datasetDisplayName, importInfo, nameConflict, skipReport).GetAwaiter().GetResult(); + return operations.PostImportAsync(groupId, datasetDisplayName, importInfo, nameConflict, skipReport, overrideReportLabel, overrideModelLabel).GetAwaiter().GetResult(); } /// @@ -92,12 +98,18 @@ public static Imports GetImports(this IImportsOperations operations, Guid groupI /// /// Determines whether to skip report import, if specified value must be 'true'. Only supported for PBIX files. /// + /// + /// Determines whether to override existing label on report during republish of PBIX file, service default value is true. + /// + /// + /// Determines whether to override existing label on model during republish of PBIX file, service default value is true. + /// /// /// The cancellation token. /// - public static async Task PostImportAsync(this IImportsOperations operations, Guid groupId, string datasetDisplayName, ImportInfo importInfo, ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task PostImportAsync(this IImportsOperations operations, Guid groupId, string datasetDisplayName, ImportInfo importInfo, ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), bool? overrideReportLabel = default(bool?), bool? overrideModelLabel = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.PostImportInGroupWithHttpMessagesAsync(groupId, datasetDisplayName, importInfo, nameConflict, skipReport, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.PostImportInGroupWithHttpMessagesAsync(groupId, datasetDisplayName, importInfo, nameConflict, skipReport, overrideReportLabel, overrideModelLabel, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -198,9 +210,15 @@ public static TemporaryUploadLocation CreateTemporaryUploadLocation(this IImport /// /// Determines whether to skip report import, if specified value must be 'true'. Only supported for PBIX files. /// - public static Import PostImportWithFile(this IImportsOperations operations, Guid groupId, Stream fileStream, string datasetDisplayName = default(string), ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?)) + /// + /// Determines whether to override existing label on report during republish of PBIX file, service default value is true. + /// + /// + /// Determines whether to override existing label on model during republish of PBIX file, service default value is true. + /// + public static Import PostImportWithFile(this IImportsOperations operations, Guid groupId, Stream fileStream, string datasetDisplayName = default(string), ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), bool? overrideReportLabel = default(bool?), bool? overrideModelLabel = default(bool?)) { - return Task.Factory.StartNew(s => ((IImportsOperations)s).PostImportFileWithHttpMessage(groupId, fileStream, datasetDisplayName, nameConflict, skipReport), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult().Body; + return Task.Factory.StartNew(s => ((IImportsOperations)s).PostImportFileWithHttpMessage(groupId, fileStream, datasetDisplayName, nameConflict, skipReport, overrideReportLabel, overrideModelLabel), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult().Body; } /// @@ -225,12 +243,18 @@ public static TemporaryUploadLocation CreateTemporaryUploadLocation(this IImport /// /// Determines whether to skip report import, if specified value must be 'true'. Only supported for PBIX files. /// + /// + /// Determines whether to override existing label on report during republish of PBIX file, service default value is true. + /// + /// + /// Determines whether to override existing label on model during republish of PBIX file, service default value is true. + /// /// /// The cancellation token. /// - public static async Task PostImportWithFileAsync(this IImportsOperations operations, Guid groupId, Stream fileStream, string datasetDisplayName = default(string), ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task PostImportWithFileAsync(this IImportsOperations operations, Guid groupId, Stream fileStream, string datasetDisplayName = default(string), ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), bool? overrideReportLabel = default(bool?), bool? overrideModelLabel = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.PostImportFileWithHttpMessage(groupId, fileStream, datasetDisplayName, nameConflict, skipReport, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.PostImportFileWithHttpMessage(groupId, fileStream, datasetDisplayName, nameConflict, skipReport, overrideReportLabel, overrideModelLabel, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/sdk/PowerBI.Api/Imports/IImportsOperations.cs b/sdk/PowerBI.Api/Imports/IImportsOperations.cs index fb25b68f..ba7f5f05 100644 --- a/sdk/PowerBI.Api/Imports/IImportsOperations.cs +++ b/sdk/PowerBI.Api/Imports/IImportsOperations.cs @@ -28,10 +28,16 @@ public partial interface IImportsOperations /// /// Determines whether to skip report import, if specified value must be 'true'. Only supported for PBIX files. /// + /// + /// Determines whether to override existing label on report during republish of PBIX file, service default value is true. + /// + /// + /// Determines whether to override existing label on model during republish of PBIX file, service default value is true. + /// /// Optional custom headers /// Optional cancellation token /// - Task> PostImportFileWithHttpMessage(Stream file, string datasetDisplayName = default(string), ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> PostImportFileWithHttpMessage(Stream file, string datasetDisplayName = default(string), ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), bool? overrideReportLabel = default(bool?), bool? overrideModelLabel = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Uploads a PBIX file to the specified group @@ -51,12 +57,18 @@ public partial interface IImportsOperations /// /// Determines whether to skip report import, if specified value must be 'true'. Only supported for PBIX files. /// + /// + /// Determines whether to override existing label on report during republish of PBIX file, service default value is true. + /// + /// + /// Determines whether to override existing label on model during republish of PBIX file, service default value is true. + /// /// /// Optional custom headers /// /// /// Optional cancellation token /// - Task> PostImportFileWithHttpMessage(Guid? groupId, Stream file, string datasetDisplayName = default(string), ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> PostImportFileWithHttpMessage(Guid? groupId, Stream file, string datasetDisplayName = default(string), ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), bool? overrideReportLabel = default(bool?), bool? overrideModelLabel = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/PowerBI.Api/Imports/ImportsOperations.cs b/sdk/PowerBI.Api/Imports/ImportsOperations.cs index 1dd4b76a..41caadfd 100644 --- a/sdk/PowerBI.Api/Imports/ImportsOperations.cs +++ b/sdk/PowerBI.Api/Imports/ImportsOperations.cs @@ -48,13 +48,19 @@ public int PostImportTimeoutInMinutes /// /// Determines whether to skip report import, if specified value must be 'true'. Only supported for PBIX files. /// + /// + /// Determines whether to override existing label on report during republish of PBIX file, service default value is true. + /// + /// + /// Determines whether to override existing label on model during republish of PBIX file, service default value is true. + /// /// /// Optional custom headers /// /// /// Optional cancellation token /// - public async Task> PostImportFileWithHttpMessage(Stream file, string datasetDisplayName = default(string), ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> PostImportFileWithHttpMessage(Stream file, string datasetDisplayName = default(string), ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), bool? overrideReportLabel = default(bool?), bool? overrideModelLabel = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { return await PostImportFileWithHttpMessage( groupId: null, @@ -62,6 +68,8 @@ public int PostImportTimeoutInMinutes datasetDisplayName: datasetDisplayName, nameConflict: nameConflict, skipReport: skipReport, + overrideReportLabel: overrideReportLabel, + overrideModelLabel: overrideModelLabel, customHeaders: customHeaders, cancellationToken: cancellationToken); } @@ -84,13 +92,19 @@ public int PostImportTimeoutInMinutes /// /// Determines whether to skip report import, if specified value must be 'true'. Only supported for PBIX files. /// + /// + /// Determines whether to override existing label on report during republish of PBIX file, service default value is true. + /// + /// + /// Determines whether to override existing label on model during republish of PBIX file, service default value is true. + /// /// /// Optional custom headers /// /// /// Optional cancellation token /// - public async Task> PostImportFileWithHttpMessage(Guid? groupId, Stream file, string datasetDisplayName = default(string), ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> PostImportFileWithHttpMessage(Guid? groupId, Stream file, string datasetDisplayName = default(string), ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), bool? overrideReportLabel = default(bool?), bool? overrideModelLabel = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Tracing string _invocationId = null; @@ -103,6 +117,8 @@ public int PostImportTimeoutInMinutes tracingParameters.Add("datasetDisplayName", datasetDisplayName); tracingParameters.Add("nameConflict", nameConflict); tracingParameters.Add("skipReport", skipReport); + tracingParameters.Add("overrideReportLabel", overrideReportLabel); + tracingParameters.Add("overrideModelLabel", overrideModelLabel); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "PostImport", tracingParameters); } @@ -119,15 +135,15 @@ public int PostImportTimeoutInMinutes if (file.Length > 1 * GB) { - return await UploadLargeFile(groupId, file, datasetDisplayName, nameConflict, skipReport, customHeaders, cancellationToken); + return await UploadLargeFile(groupId, file, datasetDisplayName, nameConflict, skipReport, overrideReportLabel, overrideModelLabel, customHeaders, cancellationToken); } else { - return await UploadFile(groupId, file, datasetDisplayName, nameConflict, skipReport, customHeaders, cancellationToken); + return await UploadFile(groupId, file, datasetDisplayName, nameConflict, skipReport, overrideReportLabel, overrideModelLabel, customHeaders, cancellationToken); } } - private async Task> UploadFile(Guid? groupId, Stream file, string datasetDisplayName = default(string), ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + private async Task> UploadFile(Guid? groupId, Stream file, string datasetDisplayName = default(string), ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), bool? overrideReportLabel = default(bool?), bool? overrideModelLabel = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -155,6 +171,15 @@ public int PostImportTimeoutInMinutes { _queryParameters.Add(string.Format("skipReport={0}", skipReport)); } + if (overrideReportLabel != null) + { + _queryParameters.Add(string.Format("overrideReportLabel={0}", overrideReportLabel)); + } + if (overrideModelLabel != null) + { + _queryParameters.Add(string.Format("overrideModelLabel={0}", overrideModelLabel)); + } + if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); @@ -254,7 +279,7 @@ public int PostImportTimeoutInMinutes } - private async Task> UploadLargeFile(Guid? groupId, Stream file, string datasetDisplayName = default(string), ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + private async Task> UploadLargeFile(Guid? groupId, Stream file, string datasetDisplayName = default(string), ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), bool? overrideReportLabel = default(bool?), bool? overrideModelLabel = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { TemporaryUploadLocation temporaryUploadLocation; @@ -285,11 +310,11 @@ public int PostImportTimeoutInMinutes if (groupId == null) { - return await powerBIClient.Imports.PostImportWithHttpMessagesAsync(datasetDisplayName, new ImportInfo { FileUrl = temporaryUploadLocation.Url }, nameConflict, skipReport); + return await powerBIClient.Imports.PostImportWithHttpMessagesAsync(datasetDisplayName, new ImportInfo { FileUrl = temporaryUploadLocation.Url }, nameConflict, skipReport, overrideReportLabel, overrideModelLabel); } else { - return await powerBIClient.Imports.PostImportInGroupWithHttpMessagesAsync(groupId.Value, datasetDisplayName, new ImportInfo { FileUrl = temporaryUploadLocation.Url }, nameConflict, skipReport); + return await powerBIClient.Imports.PostImportInGroupWithHttpMessagesAsync(groupId.Value, datasetDisplayName, new ImportInfo { FileUrl = temporaryUploadLocation.Url }, nameConflict, skipReport, overrideReportLabel, overrideModelLabel); } } } diff --git a/sdk/PowerBI.Api/Imports/ImportsOperationsExtensions.cs b/sdk/PowerBI.Api/Imports/ImportsOperationsExtensions.cs index 120b7b6c..9a5b457b 100644 --- a/sdk/PowerBI.Api/Imports/ImportsOperationsExtensions.cs +++ b/sdk/PowerBI.Api/Imports/ImportsOperationsExtensions.cs @@ -29,9 +29,15 @@ public static partial class ImportsOperationsExtensions /// /// Determines whether to skip report import, if specified value must be 'true'. Only supported for PBIX files. /// - public static Import PostImportWithFileInGroup(this IImportsOperations operations, Guid groupId, Stream fileStream, string datasetDisplayName = default(string), ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?)) + /// + /// Determines whether to override existing label on report during republish of PBIX file, service default value is true. + /// + /// + /// Determines whether to override existing label on model during republish of PBIX file, service default value is true. + /// + public static Import PostImportWithFileInGroup(this IImportsOperations operations, Guid groupId, Stream fileStream, string datasetDisplayName = default(string), ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), bool? overrideReportLabel = default(bool?), bool? overrideModelLabel = default(bool?)) { - return Task.Factory.StartNew(s => ((IImportsOperations)s).PostImportFileWithHttpMessage(groupId, fileStream, datasetDisplayName, nameConflict), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult().Body; + return Task.Factory.StartNew(s => ((IImportsOperations)s).PostImportFileWithHttpMessage(groupId, fileStream, datasetDisplayName, nameConflict, overrideReportLabel: overrideReportLabel, overrideModelLabel: overrideModelLabel), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult().Body; } /// @@ -55,12 +61,18 @@ public static partial class ImportsOperationsExtensions /// /// Determines whether to skip report import, if specified value must be 'true'. Only supported for PBIX files. /// + /// + /// Determines whether to override existing label on report during republish of PBIX file, service default value is true. + /// + /// + /// Determines whether to override existing label on model during republish of PBIX file, service default value is true. + /// /// /// The cancellation token. /// - public static async Task PostImportWithFileAsyncInGroup(this IImportsOperations operations, Guid groupId, Stream fileStream, string datasetDisplayName = default(string), ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task PostImportWithFileAsyncInGroup(this IImportsOperations operations, Guid groupId, Stream fileStream, string datasetDisplayName = default(string), ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), bool? overrideReportLabel = default(bool?), bool? overrideModelLabel = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.PostImportFileWithHttpMessage(groupId, fileStream, datasetDisplayName, nameConflict, skipReport, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.PostImportFileWithHttpMessage(groupId, fileStream, datasetDisplayName, nameConflict, skipReport, overrideReportLabel, overrideModelLabel, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -84,9 +96,15 @@ public static partial class ImportsOperationsExtensions /// /// Determines whether to skip report import, if specified value must be 'true'. Only supported for PBIX files. /// - public static Import PostImportWithFile(this IImportsOperations operations, Stream fileStream, string datasetDisplayName = default(string), ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?)) + /// + /// Determines whether to override existing label on report during republish of PBIX file, service default value is true. + /// + /// + /// Determines whether to override existing label on model during republish of PBIX file, service default value is true. + /// + public static Import PostImportWithFile(this IImportsOperations operations, Stream fileStream, string datasetDisplayName = default(string), ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), bool? overrideReportLabel = default(bool?), bool? overrideModelLabel = default(bool?)) { - return Task.Factory.StartNew(s => ((IImportsOperations)s).PostImportFileWithHttpMessage(fileStream, datasetDisplayName, nameConflict, skipReport), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult().Body; + return Task.Factory.StartNew(s => ((IImportsOperations)s).PostImportFileWithHttpMessage(fileStream, datasetDisplayName, nameConflict, skipReport, overrideReportLabel, overrideModelLabel), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult().Body; } /// @@ -107,12 +125,18 @@ public static partial class ImportsOperationsExtensions /// /// Determines whether to skip report import, if specified value must be 'true'. Only supported for PBIX files. /// + /// + /// Determines whether to override existing label on report during republish of PBIX file, service default value is true. + /// + /// + /// Determines whether to override existing label on model during republish of PBIX file, service default value is true. + /// /// /// The cancellation token. /// - public static async Task PostImportWithFileAsync(this IImportsOperations operations, Stream fileStream, string datasetDisplayName = default(string), ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task PostImportWithFileAsync(this IImportsOperations operations, Stream fileStream, string datasetDisplayName = default(string), ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), bool? overrideReportLabel = default(bool?), bool? overrideModelLabel = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.PostImportFileWithHttpMessage(fileStream, datasetDisplayName, nameConflict, skipReport, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.PostImportFileWithHttpMessage(fileStream, datasetDisplayName, nameConflict, skipReport, overrideReportLabel, overrideModelLabel, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/sdk/PowerBI.Api/Source/Admin.cs b/sdk/PowerBI.Api/Source/Admin.cs index 425297dd..b4d1fa1c 100644 --- a/sdk/PowerBI.Api/Source/Admin.cs +++ b/sdk/PowerBI.Api/Source/Admin.cs @@ -347,7 +347,7 @@ public Admin(PowerBIClient client) /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// Tenant key id + /// The tenant key ID /// /// /// Tenant key information @@ -654,7 +654,7 @@ public Admin(PowerBIClient client) /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The capacity Id + /// The capacity ID /// /// /// Patch capacity information @@ -969,7 +969,7 @@ public Admin(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The capacity id + /// The capacity ID /// /// /// Returns only the first n results. @@ -1150,10 +1150,10 @@ public Admin(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The capacity id + /// The capacity ID /// /// - /// The refreshable id + /// The refreshable ID /// /// /// Expands related entities inline, receives a comma-separated list of data @@ -1318,7 +1318,7 @@ public Admin(PowerBIClient client) /// Tenant.Read.All or Tenant.ReadWrite.All. <br/>Delegated permissions /// are supported. <br/>To call this API, provide either a continuation /// token or both a start and end date time. StartDateTime and EndDateTime must - /// be in the same UTC day. + /// be in the same UTC day and should be wrapped in ''. /// /// /// Start date and time of the window for audit event results. Must be in ISO diff --git a/sdk/PowerBI.Api/Source/AdminExtensions.cs b/sdk/PowerBI.Api/Source/AdminExtensions.cs index 98d6fe25..60cb3b0d 100644 --- a/sdk/PowerBI.Api/Source/AdminExtensions.cs +++ b/sdk/PowerBI.Api/Source/AdminExtensions.cs @@ -126,7 +126,7 @@ public static TenantKeys GetPowerBIEncryptionKeys(this IAdmin operations) /// The operations group for this extension method. /// /// - /// Tenant key id + /// The tenant key ID /// /// /// Tenant key information @@ -151,7 +151,7 @@ public static TenantKey RotatePowerBIEncryptionKey(this IAdmin operations, Syste /// The operations group for this extension method. /// /// - /// Tenant key id + /// The tenant key ID /// /// /// Tenant key information @@ -234,7 +234,7 @@ public static TenantKey RotatePowerBIEncryptionKey(this IAdmin operations, Syste /// The operations group for this extension method. /// /// - /// The capacity Id + /// The capacity ID /// /// /// Patch capacity information @@ -259,7 +259,7 @@ public static void PatchCapacityAsAdmin(this IAdmin operations, System.Guid capa /// The operations group for this extension method. /// /// - /// The capacity Id + /// The capacity ID /// /// /// Patch capacity information @@ -363,7 +363,7 @@ public static void PatchCapacityAsAdmin(this IAdmin operations, System.Guid capa /// The operations group for this extension method. /// /// - /// The capacity id + /// The capacity ID /// /// /// Returns only the first n results. @@ -401,7 +401,7 @@ public static void PatchCapacityAsAdmin(this IAdmin operations, System.Guid capa /// The operations group for this extension method. /// /// - /// The capacity id + /// The capacity ID /// /// /// Returns only the first n results. @@ -445,10 +445,10 @@ public static void PatchCapacityAsAdmin(this IAdmin operations, System.Guid capa /// The operations group for this extension method. /// /// - /// The capacity id + /// The capacity ID /// /// - /// The refreshable id + /// The refreshable ID /// /// /// Expands related entities inline, receives a comma-separated list of data @@ -476,10 +476,10 @@ public static void PatchCapacityAsAdmin(this IAdmin operations, System.Guid capa /// The operations group for this extension method. /// /// - /// The capacity id + /// The capacity ID /// /// - /// The refreshable id + /// The refreshable ID /// /// /// Expands related entities inline, receives a comma-separated list of data @@ -508,7 +508,7 @@ public static void PatchCapacityAsAdmin(this IAdmin operations, System.Guid capa /// Tenant.Read.All or Tenant.ReadWrite.All. <br/>Delegated permissions /// are supported. <br/>To call this API, provide either a continuation /// token or both a start and end date time. StartDateTime and EndDateTime must - /// be in the same UTC day. + /// be in the same UTC day and should be wrapped in ''. /// /// /// The operations group for this extension method. @@ -545,7 +545,7 @@ public static void PatchCapacityAsAdmin(this IAdmin operations, System.Guid capa /// Tenant.Read.All or Tenant.ReadWrite.All. <br/>Delegated permissions /// are supported. <br/>To call this API, provide either a continuation /// token or both a start and end date time. StartDateTime and EndDateTime must - /// be in the same UTC day. + /// be in the same UTC day and should be wrapped in ''. /// /// /// The operations group for this extension method. diff --git a/sdk/PowerBI.Api/Source/AppsOperations.cs b/sdk/PowerBI.Api/Source/AppsOperations.cs index d20df2e1..cdea24e7 100644 --- a/sdk/PowerBI.Api/Source/AppsOperations.cs +++ b/sdk/PowerBI.Api/Source/AppsOperations.cs @@ -188,7 +188,7 @@ public AppsOperations(PowerBIClient client) /// Service principal authentication is not supported.<br/> /// /// - /// The app id + /// The app ID /// /// /// Headers that will be added to request. @@ -325,7 +325,7 @@ public AppsOperations(PowerBIClient client) /// Service principal authentication is not supported.<br/> /// /// - /// The app id + /// The app ID /// /// /// Headers that will be added to request. @@ -462,10 +462,10 @@ public AppsOperations(PowerBIClient client) /// Service principal authentication is not supported.<br/> /// /// - /// The app id + /// The app ID /// /// - /// The report id + /// The report ID /// /// /// Headers that will be added to request. @@ -605,7 +605,7 @@ public AppsOperations(PowerBIClient client) /// Service principal authentication is not supported.<br/> /// /// - /// The app id + /// The app ID /// /// /// Headers that will be added to request. @@ -743,10 +743,10 @@ public AppsOperations(PowerBIClient client) /// Service principal authentication is not supported.<br/> /// /// - /// The app id + /// The app ID /// /// - /// The dashboard id + /// The dashboard ID /// /// /// Headers that will be added to request. @@ -886,10 +886,10 @@ public AppsOperations(PowerBIClient client) /// Service principal authentication is not supported.<br/> /// /// - /// The app id + /// The app ID /// /// - /// The dashboard id + /// The dashboard ID /// /// /// Headers that will be added to request. @@ -1032,13 +1032,13 @@ public AppsOperations(PowerBIClient client) /// Service principal authentication is not supported.<br/> /// /// - /// The app id + /// The app ID /// /// - /// The dashboard id + /// The dashboard ID /// /// - /// The tile id + /// The tile ID /// /// /// Headers that will be added to request. @@ -1169,5 +1169,292 @@ public AppsOperations(PowerBIClient client) return _result; } + /// + /// Returns a list of apps in the orginization (Preview). + /// + /// + /// This API allows 200 requests per hour at maximum. + /// <br/><br/>**Required scope**: Tenant.Read.All or + /// Tenant.ReadWrite.All. <br/>Delegated permissions are supported. + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). Query + /// parameter $top is mandatory to access this API + /// + /// + /// The requested number of entries in the refresh history. If not provided, + /// the default is all available entries. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAppsAsAdminWithHttpMessagesAsync(int top, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (top < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "top", 1); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("top", top); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAppsAsAdmin", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/admin/apps").ToString(); + List _queryParameters = new List(); + _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"')))); + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Returns a list of users that have access to the specified app (Preview). + /// + /// + /// This API allows 200 requests per hour at maximum. + /// <br/><br/>**Required scope**: Tenant.Read.All or + /// Tenant.ReadWrite.All. <br/>Delegated permissions are supported. + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The app ID + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAppUsersAsAdminWithHttpMessagesAsync(System.Guid appId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("appId", appId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAppUsersAsAdmin", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/admin/apps/{appId}/users").ToString(); + _url = _url.Replace("{appId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(appId, Client.SerializationSettings).Trim('"'))); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + } } diff --git a/sdk/PowerBI.Api/Source/AppsOperationsExtensions.cs b/sdk/PowerBI.Api/Source/AppsOperationsExtensions.cs index 1a55ef2e..5a5d919e 100644 --- a/sdk/PowerBI.Api/Source/AppsOperationsExtensions.cs +++ b/sdk/PowerBI.Api/Source/AppsOperationsExtensions.cs @@ -68,7 +68,7 @@ public static Apps GetApps(this IAppsOperations operations) /// The operations group for this extension method. /// /// - /// The app id + /// The app ID /// public static App GetApp(this IAppsOperations operations, System.Guid appId) { @@ -88,7 +88,7 @@ public static App GetApp(this IAppsOperations operations, System.Guid appId) /// The operations group for this extension method. /// /// - /// The app id + /// The app ID /// /// /// The cancellation token. @@ -114,7 +114,7 @@ public static App GetApp(this IAppsOperations operations, System.Guid appId) /// The operations group for this extension method. /// /// - /// The app id + /// The app ID /// public static Reports GetReports(this IAppsOperations operations, System.Guid appId) { @@ -134,7 +134,7 @@ public static Reports GetReports(this IAppsOperations operations, System.Guid ap /// The operations group for this extension method. /// /// - /// The app id + /// The app ID /// /// /// The cancellation token. @@ -160,10 +160,10 @@ public static Reports GetReports(this IAppsOperations operations, System.Guid ap /// The operations group for this extension method. /// /// - /// The app id + /// The app ID /// /// - /// The report id + /// The report ID /// public static Report GetReport(this IAppsOperations operations, System.Guid appId, System.Guid reportId) { @@ -183,10 +183,10 @@ public static Report GetReport(this IAppsOperations operations, System.Guid appI /// The operations group for this extension method. /// /// - /// The app id + /// The app ID /// /// - /// The report id + /// The report ID /// /// /// The cancellation token. @@ -213,7 +213,7 @@ public static Report GetReport(this IAppsOperations operations, System.Guid appI /// The operations group for this extension method. /// /// - /// The app id + /// The app ID /// public static Dashboards GetDashboards(this IAppsOperations operations, System.Guid appId) { @@ -234,7 +234,7 @@ public static Dashboards GetDashboards(this IAppsOperations operations, System.G /// The operations group for this extension method. /// /// - /// The app id + /// The app ID /// /// /// The cancellation token. @@ -261,10 +261,10 @@ public static Dashboards GetDashboards(this IAppsOperations operations, System.G /// The operations group for this extension method. /// /// - /// The app id + /// The app ID /// /// - /// The dashboard id + /// The dashboard ID /// public static Dashboard GetDashboard(this IAppsOperations operations, System.Guid appId, System.Guid dashboardId) { @@ -285,10 +285,10 @@ public static Dashboard GetDashboard(this IAppsOperations operations, System.Gui /// The operations group for this extension method. /// /// - /// The app id + /// The app ID /// /// - /// The dashboard id + /// The dashboard ID /// /// /// The cancellation token. @@ -315,10 +315,10 @@ public static Dashboard GetDashboard(this IAppsOperations operations, System.Gui /// The operations group for this extension method. /// /// - /// The app id + /// The app ID /// /// - /// The dashboard id + /// The dashboard ID /// public static Tiles GetTiles(this IAppsOperations operations, System.Guid appId, System.Guid dashboardId) { @@ -339,10 +339,10 @@ public static Tiles GetTiles(this IAppsOperations operations, System.Guid appId, /// The operations group for this extension method. /// /// - /// The app id + /// The app ID /// /// - /// The dashboard id + /// The dashboard ID /// /// /// The cancellation token. @@ -372,13 +372,13 @@ public static Tiles GetTiles(this IAppsOperations operations, System.Guid appId, /// The operations group for this extension method. /// /// - /// The app id + /// The app ID /// /// - /// The dashboard id + /// The dashboard ID /// /// - /// The tile id + /// The tile ID /// public static Tile GetTile(this IAppsOperations operations, System.Guid appId, System.Guid dashboardId, System.Guid tileId) { @@ -402,13 +402,13 @@ public static Tile GetTile(this IAppsOperations operations, System.Guid appId, S /// The operations group for this extension method. /// /// - /// The app id + /// The app ID /// /// - /// The dashboard id + /// The dashboard ID /// /// - /// The tile id + /// The tile ID /// /// /// The cancellation token. @@ -421,5 +421,105 @@ public static Tile GetTile(this IAppsOperations operations, System.Guid appId, S } } + /// + /// Returns a list of apps in the orginization (Preview). + /// + /// + /// This API allows 200 requests per hour at maximum. + /// <br/><br/>**Required scope**: Tenant.Read.All or + /// Tenant.ReadWrite.All. <br/>Delegated permissions are supported. + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). Query + /// parameter $top is mandatory to access this API + /// + /// + /// The operations group for this extension method. + /// + /// + /// The requested number of entries in the refresh history. If not provided, + /// the default is all available entries. + /// + public static Apps GetAppsAsAdmin(this IAppsOperations operations, int top) + { + return operations.GetAppsAsAdminAsync(top).GetAwaiter().GetResult(); + } + + /// + /// Returns a list of apps in the orginization (Preview). + /// + /// + /// This API allows 200 requests per hour at maximum. + /// <br/><br/>**Required scope**: Tenant.Read.All or + /// Tenant.ReadWrite.All. <br/>Delegated permissions are supported. + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). Query + /// parameter $top is mandatory to access this API + /// + /// + /// The operations group for this extension method. + /// + /// + /// The requested number of entries in the refresh history. If not provided, + /// the default is all available entries. + /// + /// + /// The cancellation token. + /// + public static async Task GetAppsAsAdminAsync(this IAppsOperations operations, int top, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAppsAsAdminWithHttpMessagesAsync(top, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Returns a list of users that have access to the specified app (Preview). + /// + /// + /// This API allows 200 requests per hour at maximum. + /// <br/><br/>**Required scope**: Tenant.Read.All or + /// Tenant.ReadWrite.All. <br/>Delegated permissions are supported. + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The app ID + /// + public static AppUsers GetAppUsersAsAdmin(this IAppsOperations operations, System.Guid appId) + { + return operations.GetAppUsersAsAdminAsync(appId).GetAwaiter().GetResult(); + } + + /// + /// Returns a list of users that have access to the specified app (Preview). + /// + /// + /// This API allows 200 requests per hour at maximum. + /// <br/><br/>**Required scope**: Tenant.Read.All or + /// Tenant.ReadWrite.All. <br/>Delegated permissions are supported. + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The app ID + /// + /// + /// The cancellation token. + /// + public static async Task GetAppUsersAsAdminAsync(this IAppsOperations operations, System.Guid appId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAppUsersAsAdminWithHttpMessagesAsync(appId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } } diff --git a/sdk/PowerBI.Api/Source/CapacitiesOperations.cs b/sdk/PowerBI.Api/Source/CapacitiesOperations.cs index b81ed146..473802a1 100644 --- a/sdk/PowerBI.Api/Source/CapacitiesOperations.cs +++ b/sdk/PowerBI.Api/Source/CapacitiesOperations.cs @@ -191,7 +191,7 @@ public CapacitiesOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The capacity Id + /// The capacity ID /// /// /// Headers that will be added to request. @@ -331,7 +331,7 @@ public CapacitiesOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The capacity Id + /// The capacity ID /// /// /// The name of the workload @@ -486,7 +486,7 @@ public CapacitiesOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The capacity Id + /// The capacity ID /// /// /// The name of the workload @@ -803,7 +803,7 @@ public CapacitiesOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The capacity id + /// The capacity ID /// /// /// Returns only the first n results. @@ -980,10 +980,10 @@ public CapacitiesOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The capacity id + /// The capacity ID /// /// - /// The refreshable id + /// The refreshable ID /// /// /// Expands related entities inline, receives a comma-separated list of data @@ -1137,7 +1137,7 @@ public CapacitiesOperations(PowerBIClient client) } /// - /// Assigns the provided workspaces to the specified capacity. + /// Assigns the provided workspaces to the specified premium capacity. /// /// /// **Note:** The user must have administrator rights (such as Office 365 @@ -1173,10 +1173,6 @@ public CapacitiesOperations(PowerBIClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "requestParameters"); } - if (requestParameters != null) - { - requestParameters.Validate(); - } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1408,5 +1404,145 @@ public CapacitiesOperations(PowerBIClient client) return _result; } + /// + /// Returns a list of users that have access to the specified workspace + /// (Preview). + /// + /// + /// **Note:** The user must have administrator rights (such as Office 365 + /// Global Administrator or Power BI Service Administrator) to call this API. + /// <br/><br/>**Required scope**: Tenant.Read.All or + /// Tenant.ReadWrite.All. <br/>Delegated permissions are supported. + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The capacity ID + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetCapacityUsersAsAdminWithHttpMessagesAsync(System.Guid capacityId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("capacityId", capacityId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetCapacityUsersAsAdmin", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/admin/capacities/{capacityId}/users").ToString(); + _url = _url.Replace("{capacityId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(capacityId, Client.SerializationSettings).Trim('"'))); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + } } diff --git a/sdk/PowerBI.Api/Source/CapacitiesOperationsExtensions.cs b/sdk/PowerBI.Api/Source/CapacitiesOperationsExtensions.cs index 4ea5c71f..e6b03ad2 100644 --- a/sdk/PowerBI.Api/Source/CapacitiesOperationsExtensions.cs +++ b/sdk/PowerBI.Api/Source/CapacitiesOperationsExtensions.cs @@ -70,7 +70,7 @@ public static Capacities GetCapacities(this ICapacitiesOperations operations) /// The operations group for this extension method. /// /// - /// The capacity Id + /// The capacity ID /// public static Workloads GetWorkloads(this ICapacitiesOperations operations, System.Guid capacityId) { @@ -94,7 +94,7 @@ public static Workloads GetWorkloads(this ICapacitiesOperations operations, Syst /// The operations group for this extension method. /// /// - /// The capacity Id + /// The capacity ID /// /// /// The cancellation token. @@ -123,7 +123,7 @@ public static Workloads GetWorkloads(this ICapacitiesOperations operations, Syst /// The operations group for this extension method. /// /// - /// The capacity Id + /// The capacity ID /// /// /// The name of the workload @@ -149,7 +149,7 @@ public static Workload GetWorkload(this ICapacitiesOperations operations, System /// The operations group for this extension method. /// /// - /// The capacity Id + /// The capacity ID /// /// /// The name of the workload @@ -181,7 +181,7 @@ public static Workload GetWorkload(this ICapacitiesOperations operations, System /// The operations group for this extension method. /// /// - /// The capacity Id + /// The capacity ID /// /// /// The name of the workload @@ -210,7 +210,7 @@ public static void PatchWorkload(this ICapacitiesOperations operations, System.G /// The operations group for this extension method. /// /// - /// The capacity Id + /// The capacity ID /// /// /// The name of the workload @@ -307,7 +307,7 @@ public static void PatchWorkload(this ICapacitiesOperations operations, System.G /// The operations group for this extension method. /// /// - /// The capacity id + /// The capacity ID /// /// /// Returns only the first n results. @@ -341,7 +341,7 @@ public static void PatchWorkload(this ICapacitiesOperations operations, System.G /// The operations group for this extension method. /// /// - /// The capacity id + /// The capacity ID /// /// /// Returns only the first n results. @@ -381,10 +381,10 @@ public static void PatchWorkload(this ICapacitiesOperations operations, System.G /// The operations group for this extension method. /// /// - /// The capacity id + /// The capacity ID /// /// - /// The refreshable id + /// The refreshable ID /// /// /// Expands related entities inline, receives a comma-separated list of data @@ -408,10 +408,10 @@ public static void PatchWorkload(this ICapacitiesOperations operations, System.G /// The operations group for this extension method. /// /// - /// The capacity id + /// The capacity ID /// /// - /// The refreshable id + /// The refreshable ID /// /// /// Expands related entities inline, receives a comma-separated list of data @@ -429,7 +429,7 @@ public static void PatchWorkload(this ICapacitiesOperations operations, System.G } /// - /// Assigns the provided workspaces to the specified capacity. + /// Assigns the provided workspaces to the specified premium capacity. /// /// /// **Note:** The user must have administrator rights (such as Office 365 @@ -450,7 +450,7 @@ public static void AssignWorkspacesToCapacity(this ICapacitiesOperations operati } /// - /// Assigns the provided workspaces to the specified capacity. + /// Assigns the provided workspaces to the specified premium capacity. /// /// /// **Note:** The user must have administrator rights (such as Office 365 @@ -518,5 +518,57 @@ public static void UnassignWorkspacesFromCapacity(this ICapacitiesOperations ope (await operations.UnassignWorkspacesFromCapacityWithHttpMessagesAsync(requestParameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); } + /// + /// Returns a list of users that have access to the specified workspace + /// (Preview). + /// + /// + /// **Note:** The user must have administrator rights (such as Office 365 + /// Global Administrator or Power BI Service Administrator) to call this API. + /// <br/><br/>**Required scope**: Tenant.Read.All or + /// Tenant.ReadWrite.All. <br/>Delegated permissions are supported. + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The capacity ID + /// + public static Refreshables GetCapacityUsersAsAdmin(this ICapacitiesOperations operations, System.Guid capacityId) + { + return operations.GetCapacityUsersAsAdminAsync(capacityId).GetAwaiter().GetResult(); + } + + /// + /// Returns a list of users that have access to the specified workspace + /// (Preview). + /// + /// + /// **Note:** The user must have administrator rights (such as Office 365 + /// Global Administrator or Power BI Service Administrator) to call this API. + /// <br/><br/>**Required scope**: Tenant.Read.All or + /// Tenant.ReadWrite.All. <br/>Delegated permissions are supported. + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The capacity ID + /// + /// + /// The cancellation token. + /// + public static async Task GetCapacityUsersAsAdminAsync(this ICapacitiesOperations operations, System.Guid capacityId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetCapacityUsersAsAdminWithHttpMessagesAsync(capacityId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } } diff --git a/sdk/PowerBI.Api/Source/DashboardsOperations.cs b/sdk/PowerBI.Api/Source/DashboardsOperations.cs index 6b2737fb..606c2a91 100644 --- a/sdk/PowerBI.Api/Source/DashboardsOperations.cs +++ b/sdk/PowerBI.Api/Source/DashboardsOperations.cs @@ -341,7 +341,7 @@ public DashboardsOperations(PowerBIClient client) /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dashboard id + /// The dashboard ID /// /// /// Headers that will be added to request. @@ -480,7 +480,7 @@ public DashboardsOperations(PowerBIClient client) /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dashboard id + /// The dashboard ID /// /// /// Headers that will be added to request. @@ -619,10 +619,10 @@ public DashboardsOperations(PowerBIClient client) /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dashboard id + /// The dashboard ID /// /// - /// The tile id + /// The tile ID /// /// /// Headers that will be added to request. @@ -755,7 +755,7 @@ public DashboardsOperations(PowerBIClient client) /// Clones the specified tile from **"My Workspace"**. /// /// - /// <br/>If target report id and target dataset are not specified, the + /// <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, @@ -768,10 +768,10 @@ public DashboardsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dashboard id + /// The dashboard ID /// /// - /// The tile id + /// The tile ID /// /// /// Clone tile parameters @@ -933,7 +933,7 @@ public DashboardsOperations(PowerBIClient client) /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Headers that will be added to request. @@ -1069,7 +1069,7 @@ public DashboardsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Add dashboard parameters @@ -1229,10 +1229,10 @@ public DashboardsOperations(PowerBIClient client) /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dashboard id + /// The dashboard ID /// /// /// Headers that will be added to request. @@ -1373,10 +1373,10 @@ public DashboardsOperations(PowerBIClient client) /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dashboard id + /// The dashboard ID /// /// /// Headers that will be added to request. @@ -1517,13 +1517,13 @@ public DashboardsOperations(PowerBIClient client) /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dashboard id + /// The dashboard ID /// /// - /// The tile id + /// The tile ID /// /// /// Headers that will be added to request. @@ -1658,7 +1658,7 @@ public DashboardsOperations(PowerBIClient client) /// Clones the specified tile from the specified workspace. /// /// - /// <br/>If target report id and target dataset are missing, the + /// <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 @@ -1671,13 +1671,13 @@ public DashboardsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dashboard id + /// The dashboard ID /// /// - /// The tile id + /// The tile ID /// /// /// Clone tile parameters @@ -1855,10 +1855,10 @@ public DashboardsOperations(PowerBIClient client) /// document along with considerations and limitations section. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dashboard id + /// The dashboard ID /// /// /// Generate token parameters @@ -2020,7 +2020,7 @@ public DashboardsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Filters the results, based on a boolean condition @@ -2362,7 +2362,7 @@ public DashboardsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dashboard id + /// The dashboard ID /// /// /// Headers that will be added to request. @@ -2489,5 +2489,146 @@ public DashboardsOperations(PowerBIClient client) return _result; } + /// + /// Returns a list of users that have access to the specified dashboard + /// (Preview). + /// + /// + /// **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/>Delegated permissions + /// are supported. <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The dashboard ID + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetDashboardUsersAsAdminWithHttpMessagesAsync(System.Guid dashboardId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("dashboardId", dashboardId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetDashboardUsersAsAdmin", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/admin/dashboards/{dashboardId}/users").ToString(); + _url = _url.Replace("{dashboardId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(dashboardId, Client.SerializationSettings).Trim('"'))); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + } } diff --git a/sdk/PowerBI.Api/Source/DashboardsOperationsExtensions.cs b/sdk/PowerBI.Api/Source/DashboardsOperationsExtensions.cs index 0e53bd37..ddb25649 100644 --- a/sdk/PowerBI.Api/Source/DashboardsOperationsExtensions.cs +++ b/sdk/PowerBI.Api/Source/DashboardsOperationsExtensions.cs @@ -109,7 +109,7 @@ public static Dashboard AddDashboard(this IDashboardsOperations operations, AddD /// The operations group for this extension method. /// /// - /// The dashboard id + /// The dashboard ID /// public static Dashboard GetDashboard(this IDashboardsOperations operations, System.Guid dashboardId) { @@ -128,7 +128,7 @@ public static Dashboard GetDashboard(this IDashboardsOperations operations, Syst /// The operations group for this extension method. /// /// - /// The dashboard id + /// The dashboard ID /// /// /// The cancellation token. @@ -156,7 +156,7 @@ public static Dashboard GetDashboard(this IDashboardsOperations operations, Syst /// The operations group for this extension method. /// /// - /// The dashboard id + /// The dashboard ID /// public static Tiles GetTiles(this IDashboardsOperations operations, System.Guid dashboardId) { @@ -178,7 +178,7 @@ public static Tiles GetTiles(this IDashboardsOperations operations, System.Guid /// The operations group for this extension method. /// /// - /// The dashboard id + /// The dashboard ID /// /// /// The cancellation token. @@ -206,10 +206,10 @@ public static Tiles GetTiles(this IDashboardsOperations operations, System.Guid /// The operations group for this extension method. /// /// - /// The dashboard id + /// The dashboard ID /// /// - /// The tile id + /// The tile ID /// public static Tile GetTile(this IDashboardsOperations operations, System.Guid dashboardId, System.Guid tileId) { @@ -231,10 +231,10 @@ public static Tile GetTile(this IDashboardsOperations operations, System.Guid da /// The operations group for this extension method. /// /// - /// The dashboard id + /// The dashboard ID /// /// - /// The tile id + /// The tile ID /// /// /// The cancellation token. @@ -251,7 +251,7 @@ public static Tile GetTile(this IDashboardsOperations operations, System.Guid da /// Clones the specified tile from **"My Workspace"**. /// /// - /// <br/>If target report id and target dataset are not specified, the + /// <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, @@ -267,10 +267,10 @@ public static Tile GetTile(this IDashboardsOperations operations, System.Guid da /// The operations group for this extension method. /// /// - /// The dashboard id + /// The dashboard ID /// /// - /// The tile id + /// The tile ID /// /// /// Clone tile parameters @@ -284,7 +284,7 @@ public static Tile CloneTile(this IDashboardsOperations operations, System.Guid /// Clones the specified tile from **"My Workspace"**. /// /// - /// <br/>If target report id and target dataset are not specified, the + /// <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, @@ -300,10 +300,10 @@ public static Tile CloneTile(this IDashboardsOperations operations, System.Guid /// The operations group for this extension method. /// /// - /// The dashboard id + /// The dashboard ID /// /// - /// The tile id + /// The tile ID /// /// /// Clone tile parameters @@ -331,7 +331,7 @@ public static Tile CloneTile(this IDashboardsOperations operations, System.Guid /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// public static Dashboards GetDashboardsInGroup(this IDashboardsOperations operations, System.Guid groupId) { @@ -350,7 +350,7 @@ public static Dashboards GetDashboardsInGroup(this IDashboardsOperations operati /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// The cancellation token. @@ -375,7 +375,7 @@ public static Dashboards GetDashboardsInGroup(this IDashboardsOperations operati /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Add dashboard parameters @@ -397,7 +397,7 @@ public static Dashboard AddDashboardInGroup(this IDashboardsOperations operation /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Add dashboard parameters @@ -425,10 +425,10 @@ public static Dashboard AddDashboardInGroup(this IDashboardsOperations operation /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dashboard id + /// The dashboard ID /// public static Dashboard GetDashboardInGroup(this IDashboardsOperations operations, System.Guid groupId, System.Guid dashboardId) { @@ -447,10 +447,10 @@ public static Dashboard GetDashboardInGroup(this IDashboardsOperations operation /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dashboard id + /// The dashboard ID /// /// /// The cancellation token. @@ -478,10 +478,10 @@ public static Dashboard GetDashboardInGroup(this IDashboardsOperations operation /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dashboard id + /// The dashboard ID /// public static Tiles GetTilesInGroup(this IDashboardsOperations operations, System.Guid groupId, System.Guid dashboardId) { @@ -503,10 +503,10 @@ public static Tiles GetTilesInGroup(this IDashboardsOperations operations, Syste /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dashboard id + /// The dashboard ID /// /// /// The cancellation token. @@ -534,13 +534,13 @@ public static Tiles GetTilesInGroup(this IDashboardsOperations operations, Syste /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dashboard id + /// The dashboard ID /// /// - /// The tile id + /// The tile ID /// public static Tile GetTileInGroup(this IDashboardsOperations operations, System.Guid groupId, System.Guid dashboardId, System.Guid tileId) { @@ -562,13 +562,13 @@ public static Tile GetTileInGroup(this IDashboardsOperations operations, System. /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dashboard id + /// The dashboard ID /// /// - /// The tile id + /// The tile ID /// /// /// The cancellation token. @@ -585,7 +585,7 @@ public static Tile GetTileInGroup(this IDashboardsOperations operations, System. /// Clones the specified tile from the specified workspace. /// /// - /// <br/>If target report id and target dataset are missing, the + /// <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 @@ -601,13 +601,13 @@ public static Tile GetTileInGroup(this IDashboardsOperations operations, System. /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dashboard id + /// The dashboard ID /// /// - /// The tile id + /// The tile ID /// /// /// Clone tile parameters @@ -621,7 +621,7 @@ public static Tile CloneTileInGroup(this IDashboardsOperations operations, Syste /// Clones the specified tile from the specified workspace. /// /// - /// <br/>If target report id and target dataset are missing, the + /// <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 @@ -637,13 +637,13 @@ public static Tile CloneTileInGroup(this IDashboardsOperations operations, Syste /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dashboard id + /// The dashboard ID /// /// - /// The tile id + /// The tile ID /// /// /// Clone tile parameters @@ -685,10 +685,10 @@ public static Tile CloneTileInGroup(this IDashboardsOperations operations, Syste /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dashboard id + /// The dashboard ID /// /// /// Generate token parameters @@ -724,10 +724,10 @@ public static EmbedToken GenerateTokenInGroup(this IDashboardsOperations operati /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dashboard id + /// The dashboard ID /// /// /// Generate token parameters @@ -759,7 +759,7 @@ public static EmbedToken GenerateTokenInGroup(this IDashboardsOperations operati /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Filters the results, based on a boolean condition @@ -791,7 +791,7 @@ public static EmbedToken GenerateTokenInGroup(this IDashboardsOperations operati /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Filters the results, based on a boolean condition @@ -901,7 +901,7 @@ public static EmbedToken GenerateTokenInGroup(this IDashboardsOperations operati /// The operations group for this extension method. /// /// - /// The dashboard id + /// The dashboard ID /// public static Tiles GetTilesAsAdmin(this IDashboardsOperations operations, System.Guid dashboardId) { @@ -924,7 +924,7 @@ public static Tiles GetTilesAsAdmin(this IDashboardsOperations operations, Syste /// The operations group for this extension method. /// /// - /// The dashboard id + /// The dashboard ID /// /// /// The cancellation token. @@ -937,5 +937,59 @@ public static Tiles GetTilesAsAdmin(this IDashboardsOperations operations, Syste } } + /// + /// Returns a list of users that have access to the specified dashboard + /// (Preview). + /// + /// + /// **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/>Delegated permissions + /// are supported. <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The dashboard ID + /// + public static DashboardUsers GetDashboardUsersAsAdmin(this IDashboardsOperations operations, System.Guid dashboardId) + { + return operations.GetDashboardUsersAsAdminAsync(dashboardId).GetAwaiter().GetResult(); + } + + /// + /// Returns a list of users that have access to the specified dashboard + /// (Preview). + /// + /// + /// **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/>Delegated permissions + /// are supported. <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The dashboard ID + /// + /// + /// The cancellation token. + /// + public static async Task GetDashboardUsersAsAdminAsync(this IDashboardsOperations operations, System.Guid dashboardId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetDashboardUsersAsAdminWithHttpMessagesAsync(dashboardId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } } diff --git a/sdk/PowerBI.Api/Source/DataflowsOperations.cs b/sdk/PowerBI.Api/Source/DataflowsOperations.cs index 1db55ba0..b702b769 100644 --- a/sdk/PowerBI.Api/Source/DataflowsOperations.cs +++ b/sdk/PowerBI.Api/Source/DataflowsOperations.cs @@ -55,10 +55,10 @@ public DataflowsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// Headers that will be added to request. @@ -184,10 +184,10 @@ public DataflowsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// Headers that will be added to request. @@ -304,10 +304,10 @@ public DataflowsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// Patch dataflow properties, capabilities and settings @@ -446,10 +446,10 @@ public DataflowsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// @@ -592,10 +592,10 @@ public DataflowsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// Headers that will be added to request. @@ -733,7 +733,7 @@ public DataflowsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Headers that will be added to request. @@ -869,10 +869,10 @@ public DataflowsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// Headers that will be added to request. @@ -1010,10 +1010,10 @@ public DataflowsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// The dataflow refresh schedule to create or update @@ -1150,10 +1150,10 @@ public DataflowsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// Headers that will be added to request. @@ -1291,10 +1291,10 @@ public DataflowsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The transaction id + /// The transaction ID /// /// /// Headers that will be added to request. @@ -1327,7 +1327,7 @@ public DataflowsOperations(PowerBIClient client) } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/groups/{groupId}/dataflows//transactions/{transactionId}/cancel").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/groups/{groupId}/dataflows/transactions/{transactionId}/cancel").ToString(); _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(groupId, Client.SerializationSettings).Trim('"'))); _url = _url.Replace("{transactionId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(transactionId, Client.SerializationSettings).Trim('"'))); // Create HTTP transport objects @@ -1436,10 +1436,10 @@ public DataflowsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// Headers that will be added to request. @@ -1581,7 +1581,7 @@ public DataflowsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Filters the results, based on a boolean condition @@ -1914,7 +1914,7 @@ public DataflowsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataflow id + /// The dataflow ID /// /// /// Headers that will be added to request. @@ -2041,7 +2041,7 @@ public DataflowsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataflow id + /// The dataflow ID /// /// /// Headers that will be added to request. @@ -2168,5 +2168,146 @@ public DataflowsOperations(PowerBIClient client) return _result; } + /// + /// Returns a list of users that have access to the specified dataflow + /// (Preview). + /// + /// + /// **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/>Delegated permissions + /// are supported. <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The dataflow ID + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetDataflowUsersAsAdminWithHttpMessagesAsync(System.Guid dataflowId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("dataflowId", dataflowId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetDataflowUsersAsAdmin", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/admin/dataflows/{dataflowId}/users").ToString(); + _url = _url.Replace("{dataflowId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(dataflowId, Client.SerializationSettings).Trim('"'))); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + } } diff --git a/sdk/PowerBI.Api/Source/DataflowsOperationsExtensions.cs b/sdk/PowerBI.Api/Source/DataflowsOperationsExtensions.cs index 10b45169..3ebb49f3 100644 --- a/sdk/PowerBI.Api/Source/DataflowsOperationsExtensions.cs +++ b/sdk/PowerBI.Api/Source/DataflowsOperationsExtensions.cs @@ -28,10 +28,10 @@ public static partial class DataflowsOperationsExtensions /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// public static Stream GetDataflow(this IDataflowsOperations operations, System.Guid groupId, System.Guid dataflowId) { @@ -50,10 +50,10 @@ public static Stream GetDataflow(this IDataflowsOperations operations, System.Gu /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// The cancellation token. @@ -78,10 +78,10 @@ public static Stream GetDataflow(this IDataflowsOperations operations, System.Gu /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// public static void DeleteDataflow(this IDataflowsOperations operations, System.Guid groupId, System.Guid dataflowId) { @@ -101,10 +101,10 @@ public static void DeleteDataflow(this IDataflowsOperations operations, System.G /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// The cancellation token. @@ -126,10 +126,10 @@ public static void DeleteDataflow(this IDataflowsOperations operations, System.G /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// Patch dataflow properties, capabilities and settings @@ -151,10 +151,10 @@ public static void UpdateDataflow(this IDataflowsOperations operations, System.G /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// Patch dataflow properties, capabilities and settings @@ -181,10 +181,10 @@ public static void UpdateDataflow(this IDataflowsOperations operations, System.G /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// @@ -210,10 +210,10 @@ public static void UpdateDataflow(this IDataflowsOperations operations, System.G /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// @@ -240,10 +240,10 @@ public static void UpdateDataflow(this IDataflowsOperations operations, System.G /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// public static Datasources GetDataflowDataSources(this IDataflowsOperations operations, System.Guid groupId, System.Guid dataflowId) { @@ -262,10 +262,10 @@ public static Datasources GetDataflowDataSources(this IDataflowsOperations opera /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// The cancellation token. @@ -290,7 +290,7 @@ public static Datasources GetDataflowDataSources(this IDataflowsOperations opera /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// public static Dataflows GetDataflows(this IDataflowsOperations operations, System.Guid groupId) { @@ -309,7 +309,7 @@ public static Dataflows GetDataflows(this IDataflowsOperations operations, Syste /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// The cancellation token. @@ -334,10 +334,10 @@ public static Dataflows GetDataflows(this IDataflowsOperations operations, Syste /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// public static DependentDataflows GetUpstreamDataflowsInGroup(this IDataflowsOperations operations, System.Guid groupId, System.Guid dataflowId) { @@ -356,10 +356,10 @@ public static DependentDataflows GetUpstreamDataflowsInGroup(this IDataflowsOper /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// The cancellation token. @@ -384,10 +384,10 @@ public static DependentDataflows GetUpstreamDataflowsInGroup(this IDataflowsOper /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// The dataflow refresh schedule to create or update @@ -409,10 +409,10 @@ public static void UpdateRefreshSchedule(this IDataflowsOperations operations, S /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// The dataflow refresh schedule to create or update @@ -437,10 +437,10 @@ public static void UpdateRefreshSchedule(this IDataflowsOperations operations, S /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// public static DataflowTransactions GetDataflowTransactions(this IDataflowsOperations operations, System.Guid groupId, System.Guid dataflowId) { @@ -459,10 +459,10 @@ public static DataflowTransactions GetDataflowTransactions(this IDataflowsOperat /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// The cancellation token. @@ -487,10 +487,10 @@ public static DataflowTransactions GetDataflowTransactions(this IDataflowsOperat /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The transaction id + /// The transaction ID /// public static DataflowTransactionStatus CancelDataflowTransaction(this IDataflowsOperations operations, System.Guid groupId, System.Guid transactionId) { @@ -509,10 +509,10 @@ public static DataflowTransactionStatus CancelDataflowTransaction(this IDataflow /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The transaction id + /// The transaction ID /// /// /// The cancellation token. @@ -541,10 +541,10 @@ public static DataflowTransactionStatus CancelDataflowTransaction(this IDataflow /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// public static DependentDataflows GetUpstreamDataflowsInGroupAsAdmin(this IDataflowsOperations operations, System.Guid groupId, System.Guid dataflowId) { @@ -567,10 +567,10 @@ public static DependentDataflows GetUpstreamDataflowsInGroupAsAdmin(this IDatafl /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// The cancellation token. @@ -599,7 +599,7 @@ public static DependentDataflows GetUpstreamDataflowsInGroupAsAdmin(this IDatafl /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Filters the results, based on a boolean condition @@ -631,7 +631,7 @@ public static DependentDataflows GetUpstreamDataflowsInGroupAsAdmin(this IDatafl /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Filters the results, based on a boolean condition @@ -733,7 +733,7 @@ public static DependentDataflows GetUpstreamDataflowsInGroupAsAdmin(this IDatafl /// The operations group for this extension method. /// /// - /// The dataflow id + /// The dataflow ID /// public static Stream ExportDataflowAsAdmin(this IDataflowsOperations operations, System.Guid dataflowId) { @@ -756,7 +756,7 @@ public static Stream ExportDataflowAsAdmin(this IDataflowsOperations operations, /// The operations group for this extension method. /// /// - /// The dataflow id + /// The dataflow ID /// /// /// The cancellation token. @@ -784,7 +784,7 @@ public static Stream ExportDataflowAsAdmin(this IDataflowsOperations operations, /// The operations group for this extension method. /// /// - /// The dataflow id + /// The dataflow ID /// public static Datasources GetDataflowDatasourcesAsAdmin(this IDataflowsOperations operations, System.Guid dataflowId) { @@ -807,7 +807,7 @@ public static Datasources GetDataflowDatasourcesAsAdmin(this IDataflowsOperation /// The operations group for this extension method. /// /// - /// The dataflow id + /// The dataflow ID /// /// /// The cancellation token. @@ -820,5 +820,59 @@ public static Datasources GetDataflowDatasourcesAsAdmin(this IDataflowsOperation } } + /// + /// Returns a list of users that have access to the specified dataflow + /// (Preview). + /// + /// + /// **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/>Delegated permissions + /// are supported. <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The dataflow ID + /// + public static DataflowUsers GetDataflowUsersAsAdmin(this IDataflowsOperations operations, System.Guid dataflowId) + { + return operations.GetDataflowUsersAsAdminAsync(dataflowId).GetAwaiter().GetResult(); + } + + /// + /// Returns a list of users that have access to the specified dataflow + /// (Preview). + /// + /// + /// **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/>Delegated permissions + /// are supported. <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The dataflow ID + /// + /// + /// The cancellation token. + /// + public static async Task GetDataflowUsersAsAdminAsync(this IDataflowsOperations operations, System.Guid dataflowId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetDataflowUsersAsAdminWithHttpMessagesAsync(dataflowId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } } diff --git a/sdk/PowerBI.Api/Source/DatasetsOperations.cs b/sdk/PowerBI.Api/Source/DatasetsOperations.cs index 37a19af5..a41cb796 100644 --- a/sdk/PowerBI.Api/Source/DatasetsOperations.cs +++ b/sdk/PowerBI.Api/Source/DatasetsOperations.cs @@ -373,7 +373,7 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// Headers that will be added to request. @@ -519,7 +519,7 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// Headers that will be added to request. @@ -635,6 +635,196 @@ public DatasetsOperations(PowerBIClient client) return _result; } + /// + /// Executes DAX queries against the provided dataset. The dataset may reside + /// in **"My Workspace"** or any other [new + /// workspace](/power-bi/collaborate-share/service-new-workspaces) (V2 + /// workspace). + /// + /// + /// <br/>**Required scope**: Dataset.ReadWrite.All or Dataset.Read.All + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// <h2>Restrictions</h2><ul><li>This operation is only + /// supported for datasets in a [new + /// workspace](/power-bi/collaborate-share/service-new-workspaces) (V2 + /// workspace)</li><li>The user issuing the request needs to have + /// [Build permissions for the + /// dataset](power-bi/connect-data/service-datasets-build-permissions).</li><li>The + /// [Allow XMLA endpoints and Analyze in Excel with on-premises + /// datasets](power-bi/admin/service-premium-connect-tools) tenant setting + /// needs to be enabled.</li><li>Datasets hosted in AsAzure or live + /// connected to an on premise Analysis Services model are not + /// supported.</li><li>Only one query returning one table of + /// maximum 100k rows is allowed. Specifying more than one query will return an + /// error.</li></ul><h2>Notes</h2><ul><li>Issuing + /// a query that returns more than one table or more than 100k rows will return + /// limited data and an error in the response. The response HTTP status will be + /// OK (200).</li><li>DAX query failures will be returned with a + /// failure HTTP status (400).</li><li>Columns that are fully + /// qualified in the query will be returned with the fully qualified name, for + /// example, Table[Column]. Columns that are renamed or created in the query + /// will be returned within square bracket, for example, + /// [MyNewColumn].</li><li>The following errors may be contained in + /// the response: DAX query failures, more than one result table in a query, + /// more than 100k rows in a query result.</li></ul> + /// + /// + /// The dataset ID + /// + /// + /// The request message + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ExecuteQueriesWithHttpMessagesAsync(string datasetId, DatasetExecuteQueriesRequest requestMessage, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (datasetId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "datasetId"); + } + if (requestMessage == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "requestMessage"); + } + if (requestMessage != null) + { + requestMessage.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("datasetId", datasetId); + tracingParameters.Add("requestMessage", requestMessage); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ExecuteQueries", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/datasets/{datasetId}/executeQueries").ToString(); + _url = _url.Replace("{datasetId}", System.Uri.EscapeDataString(datasetId)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(requestMessage != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(requestMessage, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + /// /// Returns a list of tables tables within the specified dataset from **"My /// Workspace"**. @@ -646,7 +836,7 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// Headers that will be added to request. @@ -794,7 +984,7 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// The table name @@ -971,7 +1161,7 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// The table name @@ -1121,7 +1311,7 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// The table name @@ -1256,7 +1446,7 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// The requested number of entries in the refresh history. If not provided, @@ -1426,7 +1616,7 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// @@ -1565,7 +1755,7 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// Headers that will be added to request. @@ -1720,7 +1910,7 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// Update Refresh Schedule parameters, by specifying all or some of the @@ -1861,7 +2051,7 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// Headers that will be added to request. @@ -2013,7 +2203,7 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// Patch DirectQuery or LiveConnection Refresh Schedule parameters, by @@ -2156,7 +2346,7 @@ public DatasetsOperations(PowerBIClient client) /// supported.<br/> /// /// - /// The dataset id + /// The dataset ID /// /// /// Headers that will be added to request. @@ -2326,7 +2516,7 @@ public DatasetsOperations(PowerBIClient client) /// types 'Any' or 'Binary' cannot be set.</li></ul> /// /// - /// The dataset id + /// The dataset ID /// /// /// @@ -2469,7 +2659,7 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// Headers that will be added to request. @@ -2650,7 +2840,7 @@ public DatasetsOperations(PowerBIClient client) /// Parameters](https://docs.microsoft.com/rest/api/power-bi/datasets/updateparameters).</li></ul> /// /// - /// The dataset id + /// The dataset ID /// /// /// @@ -2803,7 +2993,7 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// The body @@ -2940,8 +3130,8 @@ public DatasetsOperations(PowerBIClient client) /// /// Binds the specified dataset from **"My Workspace"** to the specified - /// gateway with (optional) given set of datasource Ids. This only supports the - /// On-Premises Data Gateway. + /// gateway, optionally with a given set of datasource IDs. This only supports + /// the on-premises data gateway. /// /// /// <br/>**Note:** API caller principal should be added as datasource @@ -2951,7 +3141,7 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// The bind to gateway request @@ -3097,7 +3287,7 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// Headers that will be added to request. @@ -3246,7 +3436,7 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// Headers that will be added to request. @@ -3392,7 +3582,7 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Headers that will be added to request. @@ -3529,7 +3719,7 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Create dataset parameters @@ -3721,7 +3911,7 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Headers that will be added to request. @@ -3857,10 +4047,10 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// Headers that will be added to request. @@ -4008,10 +4198,10 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// Headers that will be added to request. @@ -4140,10 +4330,10 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// Headers that will be added to request. @@ -4293,10 +4483,10 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The table name @@ -4475,10 +4665,10 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The table name @@ -4630,10 +4820,10 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The table name @@ -4770,10 +4960,10 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The requested number of entries in the refresh history. If not provided, @@ -4945,10 +5135,10 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// @@ -5089,10 +5279,10 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// Headers that will be added to request. @@ -5249,10 +5439,10 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// Update Refresh Schedule parameters, by specifying all or some of the @@ -5395,10 +5585,10 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// Headers that will be added to request. @@ -5552,10 +5742,10 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// Patch DirectQuery or LiveConnection Refresh Schedule parameters, by @@ -5700,7 +5890,7 @@ public DatasetsOperations(PowerBIClient client) /// supported.<br/> /// /// - /// The workspace id + /// The workspace ID /// /// /// @@ -5875,7 +6065,7 @@ public DatasetsOperations(PowerBIClient client) /// types 'Any' or 'Binary' cannot be set.</li></ul> /// /// - /// The workspace id + /// The workspace ID /// /// /// @@ -6022,7 +6212,7 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// @@ -6207,7 +6397,7 @@ public DatasetsOperations(PowerBIClient client) /// Group](https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/updateparametersingroup).</li></ul> /// /// - /// The workspace id + /// The workspace ID /// /// /// @@ -6364,10 +6554,10 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The body @@ -6506,8 +6696,8 @@ public DatasetsOperations(PowerBIClient client) /// /// Binds the specified dataset from the specified workspace to the specified - /// gateway with (optional) given set of datasource Ids. This only supports the - /// On-Premises Data Gateway. + /// gateway, optionally with a given set of datasource IDs. This only supports + /// the on-premises data gateway. /// /// /// <br/>**Note:** API caller principal should be added as datasource @@ -6517,10 +6707,10 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The bind to gateway request @@ -6668,10 +6858,10 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// Headers that will be added to request. @@ -6822,10 +7012,10 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// Headers that will be added to request. @@ -6974,10 +7164,10 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// Headers that will be added to request. @@ -7115,10 +7305,10 @@ public DatasetsOperations(PowerBIClient client) /// document along with considerations and limitations section. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// Generate token parameters @@ -7586,6 +7776,147 @@ public DatasetsOperations(PowerBIClient client) return _result; } + /// + /// Returns a list of users that have access to the specified dataset + /// (Preview). + /// + /// + /// **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/>Delegated permissions + /// are supported. <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The dataset ID + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetDatasetUsersAsAdminWithHttpMessagesAsync(System.Guid datasetId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("datasetId", datasetId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetDatasetUsersAsAdmin", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/admin/datasets/{datasetId}/users").ToString(); + _url = _url.Replace("{datasetId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(datasetId, Client.SerializationSettings).Trim('"'))); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + /// /// Returns a list of datasets from the specified workspace. /// @@ -7599,7 +7930,7 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Filters the results, based on a boolean condition @@ -7777,7 +8108,7 @@ public DatasetsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Headers that will be added to request. diff --git a/sdk/PowerBI.Api/Source/DatasetsOperationsExtensions.cs b/sdk/PowerBI.Api/Source/DatasetsOperationsExtensions.cs index 92340655..7afb2583 100644 --- a/sdk/PowerBI.Api/Source/DatasetsOperationsExtensions.cs +++ b/sdk/PowerBI.Api/Source/DatasetsOperationsExtensions.cs @@ -117,7 +117,7 @@ public static Datasets GetDatasets(this IDatasetsOperations operations) /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// public static Dataset GetDataset(this IDatasetsOperations operations, string datasetId) { @@ -136,7 +136,7 @@ public static Dataset GetDataset(this IDatasetsOperations operations, string dat /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// The cancellation token. @@ -161,7 +161,7 @@ public static Dataset GetDataset(this IDatasetsOperations operations, string dat /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// public static void DeleteDataset(this IDatasetsOperations operations, string datasetId) { @@ -180,7 +180,7 @@ public static void DeleteDataset(this IDatasetsOperations operations, string dat /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// The cancellation token. @@ -190,6 +190,108 @@ public static void DeleteDataset(this IDatasetsOperations operations, string dat (await operations.DeleteDatasetWithHttpMessagesAsync(datasetId, null, cancellationToken).ConfigureAwait(false)).Dispose(); } + /// + /// Executes DAX queries against the provided dataset. The dataset may reside + /// in **"My Workspace"** or any other [new + /// workspace](/power-bi/collaborate-share/service-new-workspaces) (V2 + /// workspace). + /// + /// + /// <br/>**Required scope**: Dataset.ReadWrite.All or Dataset.Read.All + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// <h2>Restrictions</h2><ul><li>This operation is only + /// supported for datasets in a [new + /// workspace](/power-bi/collaborate-share/service-new-workspaces) (V2 + /// workspace)</li><li>The user issuing the request needs to have + /// [Build permissions for the + /// dataset](power-bi/connect-data/service-datasets-build-permissions).</li><li>The + /// [Allow XMLA endpoints and Analyze in Excel with on-premises + /// datasets](power-bi/admin/service-premium-connect-tools) tenant setting + /// needs to be enabled.</li><li>Datasets hosted in AsAzure or live + /// connected to an on premise Analysis Services model are not + /// supported.</li><li>Only one query returning one table of + /// maximum 100k rows is allowed. Specifying more than one query will return an + /// error.</li></ul><h2>Notes</h2><ul><li>Issuing + /// a query that returns more than one table or more than 100k rows will return + /// limited data and an error in the response. The response HTTP status will be + /// OK (200).</li><li>DAX query failures will be returned with a + /// failure HTTP status (400).</li><li>Columns that are fully + /// qualified in the query will be returned with the fully qualified name, for + /// example, Table[Column]. Columns that are renamed or created in the query + /// will be returned within square bracket, for example, + /// [MyNewColumn].</li><li>The following errors may be contained in + /// the response: DAX query failures, more than one result table in a query, + /// more than 100k rows in a query result.</li></ul> + /// + /// + /// The operations group for this extension method. + /// + /// + /// The dataset ID + /// + /// + /// The request message + /// + public static DatasetExecuteQueriesResponse ExecuteQueries(this IDatasetsOperations operations, string datasetId, DatasetExecuteQueriesRequest requestMessage) + { + return operations.ExecuteQueriesAsync(datasetId, requestMessage).GetAwaiter().GetResult(); + } + + /// + /// Executes DAX queries against the provided dataset. The dataset may reside + /// in **"My Workspace"** or any other [new + /// workspace](/power-bi/collaborate-share/service-new-workspaces) (V2 + /// workspace). + /// + /// + /// <br/>**Required scope**: Dataset.ReadWrite.All or Dataset.Read.All + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// <h2>Restrictions</h2><ul><li>This operation is only + /// supported for datasets in a [new + /// workspace](/power-bi/collaborate-share/service-new-workspaces) (V2 + /// workspace)</li><li>The user issuing the request needs to have + /// [Build permissions for the + /// dataset](power-bi/connect-data/service-datasets-build-permissions).</li><li>The + /// [Allow XMLA endpoints and Analyze in Excel with on-premises + /// datasets](power-bi/admin/service-premium-connect-tools) tenant setting + /// needs to be enabled.</li><li>Datasets hosted in AsAzure or live + /// connected to an on premise Analysis Services model are not + /// supported.</li><li>Only one query returning one table of + /// maximum 100k rows is allowed. Specifying more than one query will return an + /// error.</li></ul><h2>Notes</h2><ul><li>Issuing + /// a query that returns more than one table or more than 100k rows will return + /// limited data and an error in the response. The response HTTP status will be + /// OK (200).</li><li>DAX query failures will be returned with a + /// failure HTTP status (400).</li><li>Columns that are fully + /// qualified in the query will be returned with the fully qualified name, for + /// example, Table[Column]. Columns that are renamed or created in the query + /// will be returned within square bracket, for example, + /// [MyNewColumn].</li><li>The following errors may be contained in + /// the response: DAX query failures, more than one result table in a query, + /// more than 100k rows in a query result.</li></ul> + /// + /// + /// The operations group for this extension method. + /// + /// + /// The dataset ID + /// + /// + /// The request message + /// + /// + /// The cancellation token. + /// + public static async Task ExecuteQueriesAsync(this IDatasetsOperations operations, string datasetId, DatasetExecuteQueriesRequest requestMessage, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ExecuteQueriesWithHttpMessagesAsync(datasetId, requestMessage, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Returns a list of tables tables within the specified dataset from **"My /// Workspace"**. @@ -204,7 +306,7 @@ public static void DeleteDataset(this IDatasetsOperations operations, string dat /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// public static Tables GetTables(this IDatasetsOperations operations, string datasetId) { @@ -225,7 +327,7 @@ public static Tables GetTables(this IDatasetsOperations operations, string datas /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// The cancellation token. @@ -252,7 +354,7 @@ public static Tables GetTables(this IDatasetsOperations operations, string datas /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// The table name @@ -279,7 +381,7 @@ public static Table PutTable(this IDatasetsOperations operations, string dataset /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// The table name @@ -314,7 +416,7 @@ public static Table PutTable(this IDatasetsOperations operations, string dataset /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// The table name @@ -343,7 +445,7 @@ public static void PostRows(this IDatasetsOperations operations, string datasetI /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// The table name @@ -373,7 +475,7 @@ public static void PostRows(this IDatasetsOperations operations, string datasetI /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// The table name @@ -397,7 +499,7 @@ public static void DeleteRows(this IDatasetsOperations operations, string datase /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// The table name @@ -423,7 +525,7 @@ public static void DeleteRows(this IDatasetsOperations operations, string datase /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// The requested number of entries in the refresh history. If not provided, @@ -447,7 +549,7 @@ public static void DeleteRows(this IDatasetsOperations operations, string datase /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// The requested number of entries in the refresh history. If not provided, @@ -482,7 +584,7 @@ public static void DeleteRows(this IDatasetsOperations operations, string datase /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// @@ -509,7 +611,7 @@ public static void DeleteRows(this IDatasetsOperations operations, string datase /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// @@ -534,7 +636,7 @@ public static void DeleteRows(this IDatasetsOperations operations, string datase /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// public static RefreshSchedule GetRefreshSchedule(this IDatasetsOperations operations, string datasetId) { @@ -554,7 +656,7 @@ public static RefreshSchedule GetRefreshSchedule(this IDatasetsOperations operat /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// The cancellation token. @@ -588,7 +690,7 @@ public static RefreshSchedule GetRefreshSchedule(this IDatasetsOperations operat /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// Update Refresh Schedule parameters, by specifying all or some of the @@ -620,7 +722,7 @@ public static void UpdateRefreshSchedule(this IDatasetsOperations operations, st /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// Update Refresh Schedule parameters, by specifying all or some of the @@ -647,7 +749,7 @@ public static void UpdateRefreshSchedule(this IDatasetsOperations operations, st /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// public static DirectQueryRefreshSchedule GetDirectQueryRefreshSchedule(this IDatasetsOperations operations, string datasetId) { @@ -667,7 +769,7 @@ public static DirectQueryRefreshSchedule GetDirectQueryRefreshSchedule(this IDat /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// The cancellation token. @@ -698,7 +800,7 @@ public static DirectQueryRefreshSchedule GetDirectQueryRefreshSchedule(this IDat /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// Patch DirectQuery or LiveConnection Refresh Schedule parameters, by @@ -727,7 +829,7 @@ public static void UpdateDirectQueryRefreshSchedule(this IDatasetsOperations ope /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// Patch DirectQuery or LiveConnection Refresh Schedule parameters, by @@ -756,7 +858,7 @@ public static void UpdateDirectQueryRefreshSchedule(this IDatasetsOperations ope /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// public static MashupParameters GetParameters(this IDatasetsOperations operations, string datasetId) { @@ -778,7 +880,7 @@ public static MashupParameters GetParameters(this IDatasetsOperations operations /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// The cancellation token. @@ -827,7 +929,7 @@ public static MashupParameters GetParameters(this IDatasetsOperations operations /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// @@ -872,7 +974,7 @@ public static void UpdateParameters(this IDatasetsOperations operations, string /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// @@ -897,7 +999,7 @@ public static void UpdateParameters(this IDatasetsOperations operations, string /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// public static Datasources GetDatasources(this IDatasetsOperations operations, string datasetId) { @@ -917,7 +1019,7 @@ public static Datasources GetDatasources(this IDatasetsOperations operations, st /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// The cancellation token. @@ -977,7 +1079,7 @@ public static Datasources GetDatasources(this IDatasetsOperations operations, st /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// @@ -1033,7 +1135,7 @@ public static void UpdateDatasources(this IDatasetsOperations operations, string /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// @@ -1068,7 +1170,7 @@ public static void UpdateDatasources(this IDatasetsOperations operations, string /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// The body @@ -1102,7 +1204,7 @@ public static void SetAllDatasetConnections(this IDatasetsOperations operations, /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// The body @@ -1118,8 +1220,8 @@ public static void SetAllDatasetConnections(this IDatasetsOperations operations, /// /// Binds the specified dataset from **"My Workspace"** to the specified - /// gateway with (optional) given set of datasource Ids. This only supports the - /// On-Premises Data Gateway. + /// gateway, optionally with a given set of datasource IDs. This only supports + /// the on-premises data gateway. /// /// /// <br/>**Note:** API caller principal should be added as datasource @@ -1132,7 +1234,7 @@ public static void SetAllDatasetConnections(this IDatasetsOperations operations, /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// The bind to gateway request @@ -1144,8 +1246,8 @@ public static void BindToGateway(this IDatasetsOperations operations, string dat /// /// Binds the specified dataset from **"My Workspace"** to the specified - /// gateway with (optional) given set of datasource Ids. This only supports the - /// On-Premises Data Gateway. + /// gateway, optionally with a given set of datasource IDs. This only supports + /// the on-premises data gateway. /// /// /// <br/>**Note:** API caller principal should be added as datasource @@ -1158,7 +1260,7 @@ public static void BindToGateway(this IDatasetsOperations operations, string dat /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// The bind to gateway request @@ -1186,7 +1288,7 @@ public static void BindToGateway(this IDatasetsOperations operations, string dat /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// public static GatewayDatasources GetGatewayDatasources(this IDatasetsOperations operations, string datasetId) { @@ -1208,7 +1310,7 @@ public static GatewayDatasources GetGatewayDatasources(this IDatasetsOperations /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// The cancellation token. @@ -1236,7 +1338,7 @@ public static GatewayDatasources GetGatewayDatasources(this IDatasetsOperations /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// public static Gateways DiscoverGateways(this IDatasetsOperations operations, string datasetId) { @@ -1258,7 +1360,7 @@ public static Gateways DiscoverGateways(this IDatasetsOperations operations, str /// The operations group for this extension method. /// /// - /// The dataset id + /// The dataset ID /// /// /// The cancellation token. @@ -1283,7 +1385,7 @@ public static Gateways DiscoverGateways(this IDatasetsOperations operations, str /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// public static Datasets GetDatasetsInGroup(this IDatasetsOperations operations, System.Guid groupId) { @@ -1302,7 +1404,7 @@ public static Datasets GetDatasetsInGroup(this IDatasetsOperations operations, S /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// The cancellation token. @@ -1328,7 +1430,7 @@ public static Datasets GetDatasetsInGroup(this IDatasetsOperations operations, S /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Create dataset parameters @@ -1354,7 +1456,7 @@ public static Datasets GetDatasetsInGroup(this IDatasetsOperations operations, S /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Create dataset parameters @@ -1386,7 +1488,7 @@ public static Datasets GetDatasetsInGroup(this IDatasetsOperations operations, S /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// public static DatasetToDataflowLinksResponse GetDatasetToDataflowsLinksInGroup(this IDatasetsOperations operations, System.Guid groupId) { @@ -1406,7 +1508,7 @@ public static DatasetToDataflowLinksResponse GetDatasetToDataflowsLinksInGroup(t /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// The cancellation token. @@ -1431,10 +1533,10 @@ public static DatasetToDataflowLinksResponse GetDatasetToDataflowsLinksInGroup(t /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// public static Dataset GetDatasetInGroup(this IDatasetsOperations operations, System.Guid groupId, string datasetId) { @@ -1453,10 +1555,10 @@ public static Dataset GetDatasetInGroup(this IDatasetsOperations operations, Sys /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The cancellation token. @@ -1481,10 +1583,10 @@ public static Dataset GetDatasetInGroup(this IDatasetsOperations operations, Sys /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// public static void DeleteDatasetInGroup(this IDatasetsOperations operations, System.Guid groupId, string datasetId) { @@ -1503,10 +1605,10 @@ public static void DeleteDatasetInGroup(this IDatasetsOperations operations, Sys /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The cancellation token. @@ -1530,10 +1632,10 @@ public static void DeleteDatasetInGroup(this IDatasetsOperations operations, Sys /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// public static Tables GetTablesInGroup(this IDatasetsOperations operations, System.Guid groupId, string datasetId) { @@ -1554,10 +1656,10 @@ public static Tables GetTablesInGroup(this IDatasetsOperations operations, Syste /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The cancellation token. @@ -1584,10 +1686,10 @@ public static Tables GetTablesInGroup(this IDatasetsOperations operations, Syste /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The table name @@ -1614,10 +1716,10 @@ public static Table PutTableInGroup(this IDatasetsOperations operations, System. /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The table name @@ -1652,10 +1754,10 @@ public static Table PutTableInGroup(this IDatasetsOperations operations, System. /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The table name @@ -1684,10 +1786,10 @@ public static void PostRowsInGroup(this IDatasetsOperations operations, System.G /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The table name @@ -1717,10 +1819,10 @@ public static void PostRowsInGroup(this IDatasetsOperations operations, System.G /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The table name @@ -1744,10 +1846,10 @@ public static void DeleteRowsInGroup(this IDatasetsOperations operations, System /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The table name @@ -1773,10 +1875,10 @@ public static void DeleteRowsInGroup(this IDatasetsOperations operations, System /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The requested number of entries in the refresh history. If not provided, @@ -1800,10 +1902,10 @@ public static void DeleteRowsInGroup(this IDatasetsOperations operations, System /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The requested number of entries in the refresh history. If not provided, @@ -1838,10 +1940,10 @@ public static void DeleteRowsInGroup(this IDatasetsOperations operations, System /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// @@ -1868,10 +1970,10 @@ public static void DeleteRowsInGroup(this IDatasetsOperations operations, System /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// @@ -1896,10 +1998,10 @@ public static void DeleteRowsInGroup(this IDatasetsOperations operations, System /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// public static RefreshSchedule GetRefreshScheduleInGroup(this IDatasetsOperations operations, System.Guid groupId, string datasetId) { @@ -1919,10 +2021,10 @@ public static RefreshSchedule GetRefreshScheduleInGroup(this IDatasetsOperations /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The cancellation token. @@ -1956,10 +2058,10 @@ public static RefreshSchedule GetRefreshScheduleInGroup(this IDatasetsOperations /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// Update Refresh Schedule parameters, by specifying all or some of the @@ -1991,10 +2093,10 @@ public static void UpdateRefreshScheduleInGroup(this IDatasetsOperations operati /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// Update Refresh Schedule parameters, by specifying all or some of the @@ -2021,10 +2123,10 @@ public static void UpdateRefreshScheduleInGroup(this IDatasetsOperations operati /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// public static DirectQueryRefreshSchedule GetDirectQueryRefreshScheduleInGroup(this IDatasetsOperations operations, System.Guid groupId, string datasetId) { @@ -2044,10 +2146,10 @@ public static DirectQueryRefreshSchedule GetDirectQueryRefreshScheduleInGroup(th /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The cancellation token. @@ -2078,10 +2180,10 @@ public static DirectQueryRefreshSchedule GetDirectQueryRefreshScheduleInGroup(th /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// Patch DirectQuery or LiveConnection Refresh Schedule parameters, by @@ -2110,10 +2212,10 @@ public static void UpdateDirectQueryRefreshScheduleInGroup(this IDatasetsOperati /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// Patch DirectQuery or LiveConnection Refresh Schedule parameters, by @@ -2142,7 +2244,7 @@ public static void UpdateDirectQueryRefreshScheduleInGroup(this IDatasetsOperati /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// @@ -2166,7 +2268,7 @@ public static MashupParameters GetParametersInGroup(this IDatasetsOperations ope /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// @@ -2218,7 +2320,7 @@ public static MashupParameters GetParametersInGroup(this IDatasetsOperations ope /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// @@ -2266,7 +2368,7 @@ public static void UpdateParametersInGroup(this IDatasetsOperations operations, /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// @@ -2293,7 +2395,7 @@ public static void UpdateParametersInGroup(this IDatasetsOperations operations, /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// @@ -2315,7 +2417,7 @@ public static Datasources GetDatasourcesInGroup(this IDatasetsOperations operati /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// @@ -2377,7 +2479,7 @@ public static Datasources GetDatasourcesInGroup(this IDatasetsOperations operati /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// @@ -2435,7 +2537,7 @@ public static void UpdateDatasourcesInGroup(this IDatasetsOperations operations, /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// @@ -2472,10 +2574,10 @@ public static void UpdateDatasourcesInGroup(this IDatasetsOperations operations, /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The body @@ -2509,10 +2611,10 @@ public static void SetAllDatasetConnectionsInGroup(this IDatasetsOperations oper /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The body @@ -2528,8 +2630,8 @@ public static void SetAllDatasetConnectionsInGroup(this IDatasetsOperations oper /// /// Binds the specified dataset from the specified workspace to the specified - /// gateway with (optional) given set of datasource Ids. This only supports the - /// On-Premises Data Gateway. + /// gateway, optionally with a given set of datasource IDs. This only supports + /// the on-premises data gateway. /// /// /// <br/>**Note:** API caller principal should be added as datasource @@ -2542,10 +2644,10 @@ public static void SetAllDatasetConnectionsInGroup(this IDatasetsOperations oper /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The bind to gateway request @@ -2557,8 +2659,8 @@ public static void BindToGatewayInGroup(this IDatasetsOperations operations, Sys /// /// Binds the specified dataset from the specified workspace to the specified - /// gateway with (optional) given set of datasource Ids. This only supports the - /// On-Premises Data Gateway. + /// gateway, optionally with a given set of datasource IDs. This only supports + /// the on-premises data gateway. /// /// /// <br/>**Note:** API caller principal should be added as datasource @@ -2571,10 +2673,10 @@ public static void BindToGatewayInGroup(this IDatasetsOperations operations, Sys /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The bind to gateway request @@ -2602,10 +2704,10 @@ public static void BindToGatewayInGroup(this IDatasetsOperations operations, Sys /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// public static GatewayDatasources GetGatewayDatasourcesInGroup(this IDatasetsOperations operations, System.Guid groupId, string datasetId) { @@ -2627,10 +2729,10 @@ public static GatewayDatasources GetGatewayDatasourcesInGroup(this IDatasetsOper /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The cancellation token. @@ -2658,10 +2760,10 @@ public static GatewayDatasources GetGatewayDatasourcesInGroup(this IDatasetsOper /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// public static Gateways DiscoverGatewaysInGroup(this IDatasetsOperations operations, System.Guid groupId, string datasetId) { @@ -2683,10 +2785,10 @@ public static Gateways DiscoverGatewaysInGroup(this IDatasetsOperations operatio /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The cancellation token. @@ -2712,10 +2814,10 @@ public static Gateways DiscoverGatewaysInGroup(this IDatasetsOperations operatio /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// public static void TakeOverInGroup(this IDatasetsOperations operations, System.Guid groupId, string datasetId) { @@ -2735,10 +2837,10 @@ public static void TakeOverInGroup(this IDatasetsOperations operations, System.G /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The cancellation token. @@ -2771,10 +2873,10 @@ public static void TakeOverInGroup(this IDatasetsOperations operations, System.G /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// Generate token parameters @@ -2807,10 +2909,10 @@ public static EmbedToken GenerateTokenInGroup(this IDatasetsOperations operation /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// Generate token parameters @@ -2944,6 +3046,60 @@ public static Datasources GetDatasourcesAsAdmin(this IDatasetsOperations operati } } + /// + /// Returns a list of users that have access to the specified dataset + /// (Preview). + /// + /// + /// **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/>Delegated permissions + /// are supported. <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The dataset ID + /// + public static DatasetUsers GetDatasetUsersAsAdmin(this IDatasetsOperations operations, System.Guid datasetId) + { + return operations.GetDatasetUsersAsAdminAsync(datasetId).GetAwaiter().GetResult(); + } + + /// + /// Returns a list of users that have access to the specified dataset + /// (Preview). + /// + /// + /// **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/>Delegated permissions + /// are supported. <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The dataset ID + /// + /// + /// The cancellation token. + /// + public static async Task GetDatasetUsersAsAdminAsync(this IDatasetsOperations operations, System.Guid datasetId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetDatasetUsersAsAdminWithHttpMessagesAsync(datasetId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Returns a list of datasets from the specified workspace. /// @@ -2960,7 +3116,7 @@ public static Datasources GetDatasourcesAsAdmin(this IDatasetsOperations operati /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Filters the results, based on a boolean condition @@ -2995,7 +3151,7 @@ public static Datasources GetDatasourcesAsAdmin(this IDatasetsOperations operati /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Filters the results, based on a boolean condition @@ -3037,7 +3193,7 @@ public static Datasources GetDatasourcesAsAdmin(this IDatasetsOperations operati /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// public static DatasetToDataflowLinksResponse GetDatasetToDataflowsLinksInGroupAsAdmin(this IDatasetsOperations operations, System.Guid groupId) { @@ -3061,7 +3217,7 @@ public static DatasetToDataflowLinksResponse GetDatasetToDataflowsLinksInGroupAs /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// The cancellation token. diff --git a/sdk/PowerBI.Api/Source/GatewaysOperations.cs b/sdk/PowerBI.Api/Source/GatewaysOperations.cs index dec754cc..137009f5 100644 --- a/sdk/PowerBI.Api/Source/GatewaysOperations.cs +++ b/sdk/PowerBI.Api/Source/GatewaysOperations.cs @@ -188,7 +188,9 @@ public GatewaysOperations(PowerBIClient client) /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// /// Headers that will be added to request. @@ -325,7 +327,9 @@ public GatewaysOperations(PowerBIClient client) /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// /// Headers that will be added to request. @@ -465,7 +469,9 @@ public GatewaysOperations(PowerBIClient client) /// credentials](https://docs.microsoft.com/power-bi/developer/encrypt-credentials)</li> /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// /// The datasource requested to create @@ -626,10 +632,12 @@ public GatewaysOperations(PowerBIClient client) /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// /// /// Headers that will be added to request. @@ -768,10 +776,12 @@ public GatewaysOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// /// /// Headers that will be added to request. @@ -896,10 +906,12 @@ public GatewaysOperations(PowerBIClient client) /// credentials](https://docs.microsoft.com/power-bi/developer/encrypt-credentials)</li> /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// /// /// The update datasource request @@ -1038,10 +1050,12 @@ public GatewaysOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// /// /// Headers that will be added to request. @@ -1159,10 +1173,12 @@ public GatewaysOperations(PowerBIClient client) /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// /// /// Headers that will be added to request. @@ -1302,10 +1318,12 @@ public GatewaysOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// /// /// The add user to datasource request @@ -1447,13 +1465,15 @@ public GatewaysOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// /// - /// The user's email address or the service principal object id + /// The user's email address or the object ID of the service principal /// /// /// Headers that will be added to request. diff --git a/sdk/PowerBI.Api/Source/GatewaysOperationsExtensions.cs b/sdk/PowerBI.Api/Source/GatewaysOperationsExtensions.cs index 0ac03f00..ff8a725b 100644 --- a/sdk/PowerBI.Api/Source/GatewaysOperationsExtensions.cs +++ b/sdk/PowerBI.Api/Source/GatewaysOperationsExtensions.cs @@ -68,7 +68,9 @@ public static Gateways GetGateways(this IGatewaysOperations operations) /// The operations group for this extension method. /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// public static Gateway GetGateway(this IGatewaysOperations operations, System.Guid gatewayId) { @@ -88,7 +90,9 @@ public static Gateway GetGateway(this IGatewaysOperations operations, System.Gui /// The operations group for this extension method. /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// /// The cancellation token. @@ -114,7 +118,9 @@ public static Gateway GetGateway(this IGatewaysOperations operations, System.Gui /// The operations group for this extension method. /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// public static GatewayDatasources GetDatasources(this IGatewaysOperations operations, System.Guid gatewayId) { @@ -134,7 +140,9 @@ public static GatewayDatasources GetDatasources(this IGatewaysOperations operati /// The operations group for this extension method. /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// /// The cancellation token. @@ -163,7 +171,9 @@ public static GatewayDatasources GetDatasources(this IGatewaysOperations operati /// The operations group for this extension method. /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// /// The datasource requested to create @@ -189,7 +199,9 @@ public static GatewayDatasource CreateDatasource(this IGatewaysOperations operat /// The operations group for this extension method. /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// /// The datasource requested to create @@ -218,10 +230,12 @@ public static GatewayDatasource CreateDatasource(this IGatewaysOperations operat /// The operations group for this extension method. /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// public static GatewayDatasource GetDatasource(this IGatewaysOperations operations, System.Guid gatewayId, System.Guid datasourceId) { @@ -241,10 +255,12 @@ public static GatewayDatasource GetDatasource(this IGatewaysOperations operation /// The operations group for this extension method. /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// /// /// The cancellation token. @@ -270,10 +286,12 @@ public static GatewayDatasource GetDatasource(this IGatewaysOperations operation /// The operations group for this extension method. /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// public static void DeleteDatasource(this IGatewaysOperations operations, System.Guid gatewayId, System.Guid datasourceId) { @@ -293,10 +311,12 @@ public static void DeleteDatasource(this IGatewaysOperations operations, System. /// The operations group for this extension method. /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// /// /// The cancellation token. @@ -326,10 +346,12 @@ public static void DeleteDatasource(this IGatewaysOperations operations, System. /// The operations group for this extension method. /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// /// /// The update datasource request @@ -359,10 +381,12 @@ public static void UpdateDatasource(this IGatewaysOperations operations, System. /// The operations group for this extension method. /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// /// /// The update datasource request @@ -389,10 +413,12 @@ public static void UpdateDatasource(this IGatewaysOperations operations, System. /// The operations group for this extension method. /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// public static void GetDatasourceStatus(this IGatewaysOperations operations, System.Guid gatewayId, System.Guid datasourceId) { @@ -413,10 +439,12 @@ public static void GetDatasourceStatus(this IGatewaysOperations operations, Syst /// The operations group for this extension method. /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// /// /// The cancellation token. @@ -439,10 +467,12 @@ public static void GetDatasourceStatus(this IGatewaysOperations operations, Syst /// The operations group for this extension method. /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// public static DatasourceUsers GetDatasourceUsers(this IGatewaysOperations operations, System.Guid gatewayId, System.Guid datasourceId) { @@ -462,10 +492,12 @@ public static DatasourceUsers GetDatasourceUsers(this IGatewaysOperations operat /// The operations group for this extension method. /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// /// /// The cancellation token. @@ -492,10 +524,12 @@ public static DatasourceUsers GetDatasourceUsers(this IGatewaysOperations operat /// The operations group for this extension method. /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// /// /// The add user to datasource request @@ -519,10 +553,12 @@ public static void AddDatasourceUser(this IGatewaysOperations operations, System /// The operations group for this extension method. /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// /// /// The add user to datasource request @@ -548,13 +584,15 @@ public static void AddDatasourceUser(this IGatewaysOperations operations, System /// The operations group for this extension method. /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// /// - /// The user's email address or the service principal object id + /// The user's email address or the object ID of the service principal /// public static void DeleteDatasourceUser(this IGatewaysOperations operations, System.Guid gatewayId, System.Guid datasourceId, string emailAdress) { @@ -574,13 +612,15 @@ public static void DeleteDatasourceUser(this IGatewaysOperations operations, Sys /// The operations group for this extension method. /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID is + /// similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// /// - /// The user's email address or the service principal object id + /// The user's email address or the object ID of the service principal /// /// /// The cancellation token. diff --git a/sdk/PowerBI.Api/Source/GroupsOperations.cs b/sdk/PowerBI.Api/Source/GroupsOperations.cs index 7c746eb9..2507a820 100644 --- a/sdk/PowerBI.Api/Source/GroupsOperations.cs +++ b/sdk/PowerBI.Api/Source/GroupsOperations.cs @@ -386,7 +386,7 @@ public GroupsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id to delete + /// The workspace ID to delete /// /// /// Headers that will be added to request. @@ -506,7 +506,7 @@ public GroupsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Headers that will be added to request. @@ -646,7 +646,7 @@ public GroupsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Details of user access right @@ -788,7 +788,7 @@ public GroupsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Details of user access right @@ -927,10 +927,11 @@ public GroupsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The email address of the user or the service principal object id to delete + /// The email address of the user or object ID of the service principal to + /// delete /// /// /// Headers that will be added to request. @@ -1200,7 +1201,7 @@ public GroupsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Assign to capacity parameters @@ -1474,7 +1475,7 @@ public GroupsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Headers that will be added to request. @@ -1615,7 +1616,7 @@ public GroupsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Assign to Power BI dataflow storage account parameters @@ -1940,7 +1941,7 @@ public GroupsOperations(PowerBIClient client) /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// The properties to update @@ -2066,6 +2067,145 @@ public GroupsOperations(PowerBIClient client) return _result; } + /// + /// Returns a list of users that have access to the specified workspace + /// (Preview). + /// + /// + /// This API allows 200 requests per hour at maximum. + /// <br/><br/>**Required scope**: Tenant.Read.All or + /// Tenant.ReadWrite.All. <br/>Delegated permissions are supported. + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The workspace ID + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetGroupUsersAsAdminWithHttpMessagesAsync(System.Guid groupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("groupId", groupId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetGroupUsersAsAdmin", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/admin/groups/{groupId}/users").ToString(); + _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(groupId, Client.SerializationSettings).Trim('"'))); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + /// /// Grants user permissions to the specified workspace. /// @@ -2079,7 +2219,7 @@ public GroupsOperations(PowerBIClient client) /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Details of user access right @@ -2222,7 +2362,7 @@ public GroupsOperations(PowerBIClient client) /// an app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// The user principal name (UPN) of the user to remove (usually the user's @@ -2358,7 +2498,7 @@ public GroupsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Details of the group restore request diff --git a/sdk/PowerBI.Api/Source/GroupsOperationsExtensions.cs b/sdk/PowerBI.Api/Source/GroupsOperationsExtensions.cs index 682025c4..540d5455 100644 --- a/sdk/PowerBI.Api/Source/GroupsOperationsExtensions.cs +++ b/sdk/PowerBI.Api/Source/GroupsOperationsExtensions.cs @@ -139,7 +139,7 @@ public static partial class GroupsOperationsExtensions /// The operations group for this extension method. /// /// - /// The workspace id to delete + /// The workspace ID to delete /// public static void DeleteGroup(this IGroupsOperations operations, System.Guid groupId) { @@ -158,7 +158,7 @@ public static void DeleteGroup(this IGroupsOperations operations, System.Guid gr /// The operations group for this extension method. /// /// - /// The workspace id to delete + /// The workspace ID to delete /// /// /// The cancellation token. @@ -185,7 +185,7 @@ public static void DeleteGroup(this IGroupsOperations operations, System.Guid gr /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// public static GroupUsers GetGroupUsers(this IGroupsOperations operations, System.Guid groupId) { @@ -209,7 +209,7 @@ public static GroupUsers GetGroupUsers(this IGroupsOperations operations, System /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// The cancellation token. @@ -238,7 +238,7 @@ public static GroupUsers GetGroupUsers(this IGroupsOperations operations, System /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Details of user access right @@ -264,7 +264,7 @@ public static void AddGroupUser(this IGroupsOperations operations, System.Guid g /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Details of user access right @@ -292,7 +292,7 @@ public static void AddGroupUser(this IGroupsOperations operations, System.Guid g /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Details of user access right @@ -317,7 +317,7 @@ public static void UpdateGroupUser(this IGroupsOperations operations, System.Gui /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Details of user access right @@ -342,10 +342,11 @@ public static void UpdateGroupUser(this IGroupsOperations operations, System.Gui /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The email address of the user or the service principal object id to delete + /// The email address of the user or object ID of the service principal to + /// delete /// public static void DeleteUserInGroup(this IGroupsOperations operations, System.Guid groupId, string user) { @@ -364,10 +365,11 @@ public static void DeleteUserInGroup(this IGroupsOperations operations, System.G /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The email address of the user or the service principal object id to delete + /// The email address of the user or object ID of the service principal to + /// delete /// /// /// The cancellation token. @@ -443,7 +445,7 @@ public static void AssignMyWorkspaceToCapacity(this IGroupsOperations operations /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Assign to capacity parameters @@ -470,7 +472,7 @@ public static void AssignToCapacity(this IGroupsOperations operations, System.Gu /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Assign to capacity parameters @@ -538,7 +540,7 @@ public static WorkspaceCapacityAssignmentStatus CapacityAssignmentStatusMyWorksp /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// public static WorkspaceCapacityAssignmentStatus CapacityAssignmentStatus(this IGroupsOperations operations, System.Guid groupId) { @@ -560,7 +562,7 @@ public static WorkspaceCapacityAssignmentStatus CapacityAssignmentStatus(this IG /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// The cancellation token. @@ -590,7 +592,7 @@ public static WorkspaceCapacityAssignmentStatus CapacityAssignmentStatus(this IG /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Assign to Power BI dataflow storage account parameters @@ -617,7 +619,7 @@ public static void AssignToDataflowStorage(this IGroupsOperations operations, Sy /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Assign to Power BI dataflow storage account parameters @@ -725,7 +727,7 @@ public static void AssignToDataflowStorage(this IGroupsOperations operations, Sy /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// The properties to update @@ -752,7 +754,7 @@ public static void UpdateGroupAsAdmin(this IGroupsOperations operations, System. /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// The properties to update @@ -765,6 +767,56 @@ public static void UpdateGroupAsAdmin(this IGroupsOperations operations, System. (await operations.UpdateGroupAsAdminWithHttpMessagesAsync(groupId, groupProperties, null, cancellationToken).ConfigureAwait(false)).Dispose(); } + /// + /// Returns a list of users that have access to the specified workspace + /// (Preview). + /// + /// + /// This API allows 200 requests per hour at maximum. + /// <br/><br/>**Required scope**: Tenant.Read.All or + /// Tenant.ReadWrite.All. <br/>Delegated permissions are supported. + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The workspace ID + /// + public static GroupUsers GetGroupUsersAsAdmin(this IGroupsOperations operations, System.Guid groupId) + { + return operations.GetGroupUsersAsAdminAsync(groupId).GetAwaiter().GetResult(); + } + + /// + /// Returns a list of users that have access to the specified workspace + /// (Preview). + /// + /// + /// This API allows 200 requests per hour at maximum. + /// <br/><br/>**Required scope**: Tenant.Read.All or + /// Tenant.ReadWrite.All. <br/>Delegated permissions are supported. + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The workspace ID + /// + /// + /// The cancellation token. + /// + public static async Task GetGroupUsersAsAdminAsync(this IGroupsOperations operations, System.Guid groupId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetGroupUsersAsAdminWithHttpMessagesAsync(groupId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Grants user permissions to the specified workspace. /// @@ -781,7 +833,7 @@ public static void UpdateGroupAsAdmin(this IGroupsOperations operations, System. /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Details of user access right @@ -807,7 +859,7 @@ public static void AddUserAsAdmin(this IGroupsOperations operations, System.Guid /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Details of user access right @@ -836,7 +888,7 @@ public static void AddUserAsAdmin(this IGroupsOperations operations, System.Guid /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// The user principal name (UPN) of the user to remove (usually the user's @@ -863,7 +915,7 @@ public static void DeleteUserAsAdmin(this IGroupsOperations operations, System.G /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// The user principal name (UPN) of the user to remove (usually the user's @@ -894,7 +946,7 @@ public static void DeleteUserAsAdmin(this IGroupsOperations operations, System.G /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Details of the group restore request @@ -921,7 +973,7 @@ public static void RestoreDeletedGroupAsAdmin(this IGroupsOperations operations, /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Details of the group restore request diff --git a/sdk/PowerBI.Api/Source/IAdmin.cs b/sdk/PowerBI.Api/Source/IAdmin.cs index 83c00410..fcd817b1 100644 --- a/sdk/PowerBI.Api/Source/IAdmin.cs +++ b/sdk/PowerBI.Api/Source/IAdmin.cs @@ -90,7 +90,7 @@ public partial interface IAdmin /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// Tenant key id + /// The tenant key ID /// /// /// Tenant key information @@ -153,7 +153,7 @@ public partial interface IAdmin /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The capacity Id + /// The capacity ID /// /// /// Patch capacity information @@ -227,7 +227,7 @@ public partial interface IAdmin /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The capacity id + /// The capacity ID /// /// /// Returns only the first n results. @@ -271,10 +271,10 @@ public partial interface IAdmin /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The capacity id + /// The capacity ID /// /// - /// The refreshable id + /// The refreshable ID /// /// /// Expands related entities inline, receives a comma-separated list of @@ -309,7 +309,8 @@ public partial interface IAdmin /// Tenant.ReadWrite.All. <br/>Delegated permissions are /// supported. <br/>To call this API, provide either a /// continuation token or both a start and end date time. StartDateTime - /// and EndDateTime must be in the same UTC day. + /// and EndDateTime must be in the same UTC day and should be wrapped + /// in ''. /// /// /// Start date and time of the window for audit event results. Must be diff --git a/sdk/PowerBI.Api/Source/IAppsOperations.cs b/sdk/PowerBI.Api/Source/IAppsOperations.cs index 8d73cd23..122fc2a6 100644 --- a/sdk/PowerBI.Api/Source/IAppsOperations.cs +++ b/sdk/PowerBI.Api/Source/IAppsOperations.cs @@ -50,7 +50,7 @@ public partial interface IAppsOperations /// Service principal authentication is not supported.<br/> /// /// - /// The app id + /// The app ID /// /// /// The headers that will be added to request. @@ -76,7 +76,7 @@ public partial interface IAppsOperations /// Service principal authentication is not supported.<br/> /// /// - /// The app id + /// The app ID /// /// /// The headers that will be added to request. @@ -102,10 +102,10 @@ public partial interface IAppsOperations /// Service principal authentication is not supported.<br/> /// /// - /// The app id + /// The app ID /// /// - /// The report id + /// The report ID /// /// /// The headers that will be added to request. @@ -131,7 +131,7 @@ public partial interface IAppsOperations /// Service principal authentication is not supported.<br/> /// /// - /// The app id + /// The app ID /// /// /// The headers that will be added to request. @@ -157,10 +157,10 @@ public partial interface IAppsOperations /// Service principal authentication is not supported.<br/> /// /// - /// The app id + /// The app ID /// /// - /// The dashboard id + /// The dashboard ID /// /// /// The headers that will be added to request. @@ -187,10 +187,10 @@ public partial interface IAppsOperations /// Service principal authentication is not supported.<br/> /// /// - /// The app id + /// The app ID /// /// - /// The dashboard id + /// The dashboard ID /// /// /// The headers that will be added to request. @@ -219,13 +219,13 @@ public partial interface IAppsOperations /// Service principal authentication is not supported.<br/> /// /// - /// The app id + /// The app ID /// /// - /// The dashboard id + /// The dashboard ID /// /// - /// The tile id + /// The tile ID /// /// /// The headers that will be added to request. @@ -240,5 +240,62 @@ public partial interface IAppsOperations /// Thrown when unable to deserialize the response /// Task> GetTileWithHttpMessagesAsync(System.Guid appId, System.Guid dashboardId, System.Guid tileId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns a list of apps in the orginization (Preview). + /// + /// + /// This API allows 200 requests per hour at maximum. + /// <br/><br/>**Required scope**: Tenant.Read.All or + /// Tenant.ReadWrite.All. <br/>Delegated permissions are + /// supported. <br/>To set the permissions scope, see [Register + /// an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// Query parameter $top is mandatory to access this API + /// + /// + /// The requested number of entries in the refresh history. If not + /// provided, the default is all available entries. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + Task> GetAppsAsAdminWithHttpMessagesAsync(int top, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns a list of users that have access to the specified app + /// (Preview). + /// + /// + /// This API allows 200 requests per hour at maximum. + /// <br/><br/>**Required scope**: Tenant.Read.All or + /// Tenant.ReadWrite.All. <br/>Delegated permissions are + /// supported. <br/>To set the permissions scope, see [Register + /// an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The app ID + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + Task> GetAppUsersAsAdminWithHttpMessagesAsync(System.Guid appId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/PowerBI.Api/Source/ICapacitiesOperations.cs b/sdk/PowerBI.Api/Source/ICapacitiesOperations.cs index dd6b596e..d6021a81 100644 --- a/sdk/PowerBI.Api/Source/ICapacitiesOperations.cs +++ b/sdk/PowerBI.Api/Source/ICapacitiesOperations.cs @@ -54,7 +54,7 @@ public partial interface ICapacitiesOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The capacity Id + /// The capacity ID /// /// /// The headers that will be added to request. @@ -83,7 +83,7 @@ public partial interface ICapacitiesOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The capacity Id + /// The capacity ID /// /// /// The name of the workload @@ -117,7 +117,7 @@ public partial interface ICapacitiesOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The capacity Id + /// The capacity ID /// /// /// The name of the workload @@ -186,7 +186,7 @@ public partial interface ICapacitiesOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The capacity id + /// The capacity ID /// /// /// Returns only the first n results. @@ -226,10 +226,10 @@ public partial interface ICapacitiesOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The capacity id + /// The capacity ID /// /// - /// The refreshable id + /// The refreshable ID /// /// /// Expands related entities inline, receives a comma-separated list of @@ -252,7 +252,7 @@ public partial interface ICapacitiesOperations /// Task> GetRefreshableForCapacityWithHttpMessagesAsync(System.Guid capacityId, string refreshableId, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Assigns the provided workspaces to the specified capacity. + /// Assigns the provided workspaces to the specified premium capacity. /// /// /// **Note:** The user must have administrator rights (such as Office @@ -305,5 +305,34 @@ public partial interface ICapacitiesOperations /// Thrown when a required parameter is null /// Task UnassignWorkspacesFromCapacityWithHttpMessagesAsync(UnassignWorkspacesCapacityRequest requestParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns a list of users that have access to the specified workspace + /// (Preview). + /// + /// + /// **Note:** The user must have administrator rights (such as Office + /// 365 Global Administrator or Power BI Service Administrator) to call + /// this API. <br/><br/>**Required scope**: Tenant.Read.All + /// or Tenant.ReadWrite.All. <br/>Delegated permissions are + /// supported. <br/>To set the permissions scope, see [Register + /// an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The capacity ID + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + Task> GetCapacityUsersAsAdminWithHttpMessagesAsync(System.Guid capacityId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/PowerBI.Api/Source/IDashboardsOperations.cs b/sdk/PowerBI.Api/Source/IDashboardsOperations.cs index 817fe24a..baf9fab3 100644 --- a/sdk/PowerBI.Api/Source/IDashboardsOperations.cs +++ b/sdk/PowerBI.Api/Source/IDashboardsOperations.cs @@ -77,7 +77,7 @@ public partial interface IDashboardsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dashboard id + /// The dashboard ID /// /// /// The headers that will be added to request. @@ -105,7 +105,7 @@ public partial interface IDashboardsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dashboard id + /// The dashboard ID /// /// /// The headers that will be added to request. @@ -133,10 +133,10 @@ public partial interface IDashboardsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dashboard id + /// The dashboard ID /// /// - /// The tile id + /// The tile ID /// /// /// The headers that will be added to request. @@ -155,7 +155,7 @@ public partial interface IDashboardsOperations /// Clones the specified tile from **"My Workspace"**. /// /// - /// <br/>If target report id and target dataset are not + /// <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 @@ -170,10 +170,10 @@ public partial interface IDashboardsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dashboard id + /// The dashboard ID /// /// - /// The tile id + /// The tile ID /// /// /// Clone tile parameters @@ -204,7 +204,7 @@ public partial interface IDashboardsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// The headers that will be added to request. @@ -228,7 +228,7 @@ public partial interface IDashboardsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Add dashboard parameters @@ -259,10 +259,10 @@ public partial interface IDashboardsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dashboard id + /// The dashboard ID /// /// /// The headers that will be added to request. @@ -290,10 +290,10 @@ public partial interface IDashboardsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dashboard id + /// The dashboard ID /// /// /// The headers that will be added to request. @@ -321,13 +321,13 @@ public partial interface IDashboardsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dashboard id + /// The dashboard ID /// /// - /// The tile id + /// The tile ID /// /// /// The headers that will be added to request. @@ -346,7 +346,7 @@ public partial interface IDashboardsOperations /// Clones the specified tile from the specified workspace. /// /// - /// <br/>If target report id and target dataset are missing, the + /// <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 @@ -361,13 +361,13 @@ public partial interface IDashboardsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dashboard id + /// The dashboard ID /// /// - /// The tile id + /// The tile ID /// /// /// Clone tile parameters @@ -411,10 +411,10 @@ public partial interface IDashboardsOperations /// document along with considerations and limitations section. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dashboard id + /// The dashboard ID /// /// /// Generate token parameters @@ -450,7 +450,7 @@ public partial interface IDashboardsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Filters the results, based on a boolean condition @@ -529,7 +529,7 @@ public partial interface IDashboardsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dashboard id + /// The dashboard ID /// /// /// The headers that will be added to request. @@ -544,5 +544,36 @@ public partial interface IDashboardsOperations /// Thrown when unable to deserialize the response /// Task> GetTilesAsAdminWithHttpMessagesAsync(System.Guid dashboardId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns a list of users that have access to the specified dashboard + /// (Preview). + /// + /// + /// **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/>Delegated permissions are + /// supported. <br/>To set the permissions scope, see [Register + /// an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The dashboard ID + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + Task> GetDashboardUsersAsAdminWithHttpMessagesAsync(System.Guid dashboardId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/PowerBI.Api/Source/IDataflowsOperations.cs b/sdk/PowerBI.Api/Source/IDataflowsOperations.cs index c80c10a4..c97208ab 100644 --- a/sdk/PowerBI.Api/Source/IDataflowsOperations.cs +++ b/sdk/PowerBI.Api/Source/IDataflowsOperations.cs @@ -29,10 +29,10 @@ public partial interface IDataflowsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// The headers that will be added to request. @@ -57,10 +57,10 @@ public partial interface IDataflowsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// The headers that will be added to request. @@ -81,10 +81,10 @@ public partial interface IDataflowsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// Patch dataflow properties, capabilities and settings @@ -113,10 +113,10 @@ public partial interface IDataflowsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// @@ -143,10 +143,10 @@ public partial interface IDataflowsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// The headers that will be added to request. @@ -171,7 +171,7 @@ public partial interface IDataflowsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// The headers that will be added to request. @@ -196,10 +196,10 @@ public partial interface IDataflowsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// The headers that will be added to request. @@ -224,10 +224,10 @@ public partial interface IDataflowsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// The dataflow refresh schedule to create or update @@ -255,10 +255,10 @@ public partial interface IDataflowsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// The headers that will be added to request. @@ -282,10 +282,10 @@ public partial interface IDataflowsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The transaction id + /// The transaction ID /// /// /// The headers that will be added to request. @@ -315,10 +315,10 @@ public partial interface IDataflowsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataflow id + /// The dataflow ID /// /// /// The headers that will be added to request. @@ -348,7 +348,7 @@ public partial interface IDataflowsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Filters the results, based on a boolean condition @@ -421,7 +421,7 @@ public partial interface IDataflowsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataflow id + /// The dataflow ID /// /// /// The headers that will be added to request. @@ -450,7 +450,7 @@ public partial interface IDataflowsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataflow id + /// The dataflow ID /// /// /// The headers that will be added to request. @@ -465,5 +465,36 @@ public partial interface IDataflowsOperations /// Thrown when unable to deserialize the response /// Task> GetDataflowDatasourcesAsAdminWithHttpMessagesAsync(System.Guid dataflowId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns a list of users that have access to the specified dataflow + /// (Preview). + /// + /// + /// **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/>Delegated permissions are + /// supported. <br/>To set the permissions scope, see [Register + /// an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The dataflow ID + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + Task> GetDataflowUsersAsAdminWithHttpMessagesAsync(System.Guid dataflowId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/PowerBI.Api/Source/IDatasetsOperations.cs b/sdk/PowerBI.Api/Source/IDatasetsOperations.cs index 6a123dd6..fbf6772e 100644 --- a/sdk/PowerBI.Api/Source/IDatasetsOperations.cs +++ b/sdk/PowerBI.Api/Source/IDatasetsOperations.cs @@ -83,7 +83,7 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// The headers that will be added to request. @@ -110,7 +110,7 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// The headers that will be added to request. @@ -126,6 +126,66 @@ public partial interface IDatasetsOperations /// Task DeleteDatasetWithHttpMessagesAsync(string datasetId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Executes DAX queries against the provided dataset. The dataset may + /// reside in **"My Workspace"** or any other [new + /// workspace](/power-bi/collaborate-share/service-new-workspaces) (V2 + /// workspace). + /// + /// + /// <br/>**Required scope**: Dataset.ReadWrite.All or + /// Dataset.Read.All <br/>To set the permissions scope, see + /// [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// <h2>Restrictions</h2><ul><li>This operation + /// is only supported for datasets in a [new + /// workspace](/power-bi/collaborate-share/service-new-workspaces) (V2 + /// workspace)</li><li>The user issuing the request needs + /// to have [Build permissions for the + /// dataset](power-bi/connect-data/service-datasets-build-permissions).</li><li>The + /// [Allow XMLA endpoints and Analyze in Excel with on-premises + /// datasets](power-bi/admin/service-premium-connect-tools) tenant + /// setting needs to be enabled.</li><li>Datasets hosted in + /// AsAzure or live connected to an on premise Analysis Services model + /// are not supported.</li><li>Only one query returning one + /// table of maximum 100k rows is allowed. Specifying more than one + /// query will return an + /// error.</li></ul><h2>Notes</h2><ul><li>Issuing + /// a query that returns more than one table or more than 100k rows + /// will return limited data and an error in the response. The response + /// HTTP status will be OK (200).</li><li>DAX query + /// failures will be returned with a failure HTTP status + /// (400).</li><li>Columns that are fully qualified in the + /// query will be returned with the fully qualified name, for example, + /// Table[Column]. Columns that are renamed or created in the query + /// will be returned within square bracket, for example, + /// [MyNewColumn].</li><li>The following errors may be + /// contained in the response: DAX query failures, more than one result + /// table in a query, more than 100k rows in a query + /// result.</li></ul> + /// + /// + /// The dataset ID + /// + /// + /// The request message + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> ExecuteQueriesWithHttpMessagesAsync(string datasetId, DatasetExecuteQueriesRequest requestMessage, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Returns a list of tables tables within the specified dataset from /// **"My Workspace"**. /// @@ -137,7 +197,7 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// The headers that will be added to request. @@ -166,7 +226,7 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// The table name @@ -203,7 +263,7 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// The table name @@ -235,7 +295,7 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// The table name @@ -264,7 +324,7 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// The requested number of entries in the refresh history. If not @@ -303,7 +363,7 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// @@ -331,7 +391,7 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// The headers that will be added to request. @@ -368,7 +428,7 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// Update Refresh Schedule parameters, by specifying all or some of @@ -398,7 +458,7 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// The headers that will be added to request. @@ -432,7 +492,7 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// Patch DirectQuery or LiveConnection Refresh Schedule parameters, by @@ -463,7 +523,7 @@ public partial interface IDatasetsOperations /// are not supported.<br/> /// /// - /// The dataset id + /// The dataset ID /// /// /// The headers that will be added to request. @@ -517,7 +577,7 @@ public partial interface IDatasetsOperations /// 'Binary' cannot be set.</li></ul> /// /// - /// The dataset id + /// The dataset ID /// /// /// @@ -545,7 +605,7 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// The headers that will be added to request. @@ -612,7 +672,7 @@ public partial interface IDatasetsOperations /// Parameters](https://docs.microsoft.com/rest/api/power-bi/datasets/updateparameters).</li></ul> /// /// - /// The dataset id + /// The dataset ID /// /// /// @@ -653,7 +713,7 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// The body @@ -674,8 +734,8 @@ public partial interface IDatasetsOperations Task SetAllDatasetConnectionsWithHttpMessagesAsync(string datasetId, ConnectionDetails parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Binds the specified dataset from **"My Workspace"** to the - /// specified gateway with (optional) given set of datasource Ids. This - /// only supports the On-Premises Data Gateway. + /// specified gateway, optionally with a given set of datasource IDs. + /// This only supports the on-premises data gateway. /// /// /// <br/>**Note:** API caller principal should be added as @@ -685,7 +745,7 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// The bind to gateway request @@ -716,7 +776,7 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// The headers that will be added to request. @@ -747,7 +807,7 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The dataset id + /// The dataset ID /// /// /// The headers that will be added to request. @@ -775,7 +835,7 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// The headers that will be added to request. @@ -801,7 +861,7 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Create dataset parameters @@ -837,7 +897,7 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// The headers that will be added to request. @@ -862,10 +922,10 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The headers that will be added to request. @@ -892,10 +952,10 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The headers that will be added to request. @@ -922,10 +982,10 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The headers that will be added to request. @@ -954,10 +1014,10 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The table name @@ -994,10 +1054,10 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The table name @@ -1029,10 +1089,10 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The table name @@ -1061,10 +1121,10 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The requested number of entries in the refresh history. If not @@ -1103,10 +1163,10 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// @@ -1134,10 +1194,10 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The headers that will be added to request. @@ -1174,10 +1234,10 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// Update Refresh Schedule parameters, by specifying all or some of @@ -1207,10 +1267,10 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The headers that will be added to request. @@ -1244,10 +1304,10 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// Patch DirectQuery or LiveConnection Refresh Schedule parameters, by @@ -1278,7 +1338,7 @@ public partial interface IDatasetsOperations /// are not supported.<br/> /// /// - /// The workspace id + /// The workspace ID /// /// /// @@ -1333,7 +1393,7 @@ public partial interface IDatasetsOperations /// 'Binary' cannot be set.</li></ul> /// /// - /// The workspace id + /// The workspace ID /// /// /// @@ -1363,7 +1423,7 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// @@ -1431,7 +1491,7 @@ public partial interface IDatasetsOperations /// Group](https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/updateparametersingroup).</li></ul> /// /// - /// The workspace id + /// The workspace ID /// /// /// @@ -1474,10 +1534,10 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The body @@ -1498,8 +1558,8 @@ public partial interface IDatasetsOperations Task SetAllDatasetConnectionsInGroupWithHttpMessagesAsync(System.Guid groupId, string datasetId, ConnectionDetails parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Binds the specified dataset from the specified workspace to the - /// specified gateway with (optional) given set of datasource Ids. This - /// only supports the On-Premises Data Gateway. + /// specified gateway, optionally with a given set of datasource IDs. + /// This only supports the on-premises data gateway. /// /// /// <br/>**Note:** API caller principal should be added as @@ -1509,10 +1569,10 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The bind to gateway request @@ -1543,10 +1603,10 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The headers that will be added to request. @@ -1577,10 +1637,10 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The headers that will be added to request. @@ -1608,10 +1668,10 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// The headers that will be added to request. @@ -1648,10 +1708,10 @@ public partial interface IDatasetsOperations /// document along with considerations and limitations section. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dataset id + /// The dataset ID /// /// /// Generate token parameters @@ -1741,6 +1801,37 @@ public partial interface IDatasetsOperations /// Task> GetDatasourcesAsAdminWithHttpMessagesAsync(string datasetId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Returns a list of users that have access to the specified dataset + /// (Preview). + /// + /// + /// **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/>Delegated permissions are + /// supported. <br/>To set the permissions scope, see [Register + /// an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The dataset ID + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + Task> GetDatasetUsersAsAdminWithHttpMessagesAsync(System.Guid datasetId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Returns a list of datasets from the specified workspace. /// /// @@ -1755,7 +1846,7 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Filters the results, based on a boolean condition @@ -1798,7 +1889,7 @@ public partial interface IDatasetsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// The headers that will be added to request. diff --git a/sdk/PowerBI.Api/Source/IGatewaysOperations.cs b/sdk/PowerBI.Api/Source/IGatewaysOperations.cs index 372ee70a..8ac7bfa7 100644 --- a/sdk/PowerBI.Api/Source/IGatewaysOperations.cs +++ b/sdk/PowerBI.Api/Source/IGatewaysOperations.cs @@ -52,7 +52,9 @@ public partial interface IGatewaysOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers + /// to the primary (first) gateway in the cluster. In such cases, + /// gateway ID is similar to gateway cluster ID. /// /// /// The headers that will be added to request. @@ -78,7 +80,9 @@ public partial interface IGatewaysOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers + /// to the primary (first) gateway in the cluster. In such cases, + /// gateway ID is similar to gateway cluster ID. /// /// /// The headers that will be added to request. @@ -106,7 +110,9 @@ public partial interface IGatewaysOperations /// credentials](https://docs.microsoft.com/power-bi/developer/encrypt-credentials)</li> /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers + /// to the primary (first) gateway in the cluster. In such cases, + /// gateway ID is similar to gateway cluster ID. /// /// /// The datasource requested to create @@ -138,10 +144,12 @@ public partial interface IGatewaysOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers + /// to the primary (first) gateway in the cluster. In such cases, + /// gateway ID is similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// /// /// The headers that will be added to request. @@ -167,10 +175,12 @@ public partial interface IGatewaysOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers + /// to the primary (first) gateway in the cluster. In such cases, + /// gateway ID is similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// /// /// The headers that will be added to request. @@ -199,10 +209,12 @@ public partial interface IGatewaysOperations /// credentials](https://docs.microsoft.com/power-bi/developer/encrypt-credentials)</li> /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers + /// to the primary (first) gateway in the cluster. In such cases, + /// gateway ID is similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// /// /// The update datasource request @@ -232,10 +244,12 @@ public partial interface IGatewaysOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers + /// to the primary (first) gateway in the cluster. In such cases, + /// gateway ID is similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// /// /// The headers that will be added to request. @@ -259,10 +273,12 @@ public partial interface IGatewaysOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers + /// to the primary (first) gateway in the cluster. In such cases, + /// gateway ID is similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// /// /// The headers that will be added to request. @@ -289,10 +305,12 @@ public partial interface IGatewaysOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers + /// to the primary (first) gateway in the cluster. In such cases, + /// gateway ID is similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// /// /// The add user to datasource request @@ -321,13 +339,15 @@ public partial interface IGatewaysOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the gateway ID refers + /// to the primary (first) gateway in the cluster. In such cases, + /// gateway ID is similar to gateway cluster ID. /// /// - /// The datasource id + /// The datasource ID /// /// - /// The user's email address or the service principal object id + /// The user's email address or the object ID of the service principal /// /// /// The headers that will be added to request. diff --git a/sdk/PowerBI.Api/Source/IGroupsOperations.cs b/sdk/PowerBI.Api/Source/IGroupsOperations.cs index 4a39ba55..ae02bfe8 100644 --- a/sdk/PowerBI.Api/Source/IGroupsOperations.cs +++ b/sdk/PowerBI.Api/Source/IGroupsOperations.cs @@ -92,7 +92,7 @@ public partial interface IGroupsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id to delete + /// The workspace ID to delete /// /// /// The headers that will be added to request. @@ -120,7 +120,7 @@ public partial interface IGroupsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// The headers that will be added to request. @@ -149,7 +149,7 @@ public partial interface IGroupsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Details of user access right @@ -179,7 +179,7 @@ public partial interface IGroupsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Details of user access right @@ -207,11 +207,11 @@ public partial interface IGroupsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The email address of the user or the service principal object id to - /// delete + /// The email address of the user or object ID of the service principal + /// to delete /// /// /// The headers that will be added to request. @@ -268,7 +268,7 @@ public partial interface IGroupsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Assign to capacity parameters @@ -321,7 +321,7 @@ public partial interface IGroupsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// The headers that will be added to request. @@ -352,7 +352,7 @@ public partial interface IGroupsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Assign to Power BI dataflow storage account parameters @@ -429,7 +429,7 @@ public partial interface IGroupsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// The properties to update @@ -448,6 +448,34 @@ public partial interface IGroupsOperations /// Task UpdateGroupAsAdminWithHttpMessagesAsync(System.Guid groupId, Group groupProperties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Returns a list of users that have access to the specified workspace + /// (Preview). + /// + /// + /// This API allows 200 requests per hour at maximum. + /// <br/><br/>**Required scope**: Tenant.Read.All or + /// Tenant.ReadWrite.All. <br/>Delegated permissions are + /// supported. <br/>To set the permissions scope, see [Register + /// an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The workspace ID + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + Task> GetGroupUsersAsAdminWithHttpMessagesAsync(System.Guid groupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Grants user permissions to the specified workspace. /// /// @@ -462,7 +490,7 @@ public partial interface IGroupsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Details of user access right @@ -495,7 +523,7 @@ public partial interface IGroupsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// The user principal name (UPN) of the user to remove (usually the @@ -529,7 +557,7 @@ public partial interface IGroupsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Details of the group restore request diff --git a/sdk/PowerBI.Api/Source/IImportsOperations.cs b/sdk/PowerBI.Api/Source/IImportsOperations.cs index 8e3b0ed7..8190e193 100644 --- a/sdk/PowerBI.Api/Source/IImportsOperations.cs +++ b/sdk/PowerBI.Api/Source/IImportsOperations.cs @@ -85,6 +85,14 @@ public partial interface IImportsOperations /// Determines whether to skip report import, if specified value must /// be 'true'. Only supported for PBIX files. /// + /// + /// Determines whether to override existing label on report during + /// republish of PBIX file, service default value is true. + /// + /// + /// Determines whether to override existing label on model during + /// republish of PBIX file, service default value is true. + /// /// /// The headers that will be added to request. /// @@ -100,7 +108,7 @@ public partial interface IImportsOperations /// /// Thrown when a required parameter is null /// - Task> PostImportWithHttpMessagesAsync(string datasetDisplayName, ImportInfo importInfo, ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> PostImportWithHttpMessagesAsync(string datasetDisplayName, ImportInfo importInfo, ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), bool? overrideReportLabel = default(bool?), bool? overrideModelLabel = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Returns the specified import from **"My Workspace"**. /// @@ -111,7 +119,7 @@ public partial interface IImportsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The import id + /// The import ID /// /// /// The headers that will be added to request. @@ -167,7 +175,7 @@ public partial interface IImportsOperations /// .pbix file from OneDrive is not supported.</li> /// /// - /// The workspace id + /// The workspace ID /// /// /// The headers that will be added to request. @@ -212,7 +220,7 @@ public partial interface IImportsOperations /// import is not supported for dataflows with service principal. /// /// - /// The workspace id + /// The workspace ID /// /// /// The display name of the dataset should include file extension. Not @@ -235,6 +243,14 @@ public partial interface IImportsOperations /// Determines whether to skip report import, if specified value must /// be 'true'. Only supported for PBIX files. /// + /// + /// Determines whether to override existing label on report during + /// republish of PBIX file, service default value is true. + /// + /// + /// Determines whether to override existing label on model during + /// republish of PBIX file, service default value is true. + /// /// /// The headers that will be added to request. /// @@ -250,7 +266,7 @@ public partial interface IImportsOperations /// /// Thrown when a required parameter is null /// - Task> PostImportInGroupWithHttpMessagesAsync(System.Guid groupId, string datasetDisplayName, ImportInfo importInfo, ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> PostImportInGroupWithHttpMessagesAsync(System.Guid groupId, string datasetDisplayName, ImportInfo importInfo, ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), bool? overrideReportLabel = default(bool?), bool? overrideModelLabel = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Returns the specified import from the specified workspace. /// @@ -261,10 +277,10 @@ public partial interface IImportsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The import id + /// The import ID /// /// /// The headers that will be added to request. @@ -297,7 +313,7 @@ public partial interface IImportsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// The headers that will be added to request. diff --git a/sdk/PowerBI.Api/Source/IInformationProtection.cs b/sdk/PowerBI.Api/Source/IInformationProtection.cs index 55095895..b1493400 100644 --- a/sdk/PowerBI.Api/Source/IInformationProtection.cs +++ b/sdk/PowerBI.Api/Source/IInformationProtection.cs @@ -29,9 +29,12 @@ public partial interface IInformationProtection /// labels.<br/>This API allows a maximum of 25 requests per /// hour. Each request can update up to 2000 artifacts. /// <br/><br/>**Required scope**: Tenant.ReadWrite.All + /// <br/><br/>**Usage sample**: [Set or remove sensitivity + /// labels using Power BI REST admin + /// APIs](https://docs.microsoft.com/power-bi/admin/service-security-sensitivity-label-inheritance-set-remove-api) /// /// - /// Composite of artifact Id lists per Type. + /// A composite of artifact ID lists for each type /// /// /// The headers that will be added to request. @@ -65,6 +68,9 @@ public partial interface IInformationProtection /// labels.<br/>This API allows a maximum of 25 requests per /// hour. Each request can update up to 2000 artifacts. /// <br/><br/>**Required scope**: Tenant.ReadWrite.All + /// <br/><br/>**Usage sample**: [Set or remove sensitivity + /// labels using Power BI REST admin + /// APIs](https://docs.microsoft.com/power-bi/admin/service-security-sensitivity-label-inheritance-set-remove-api) /// /// /// Set label details. diff --git a/sdk/PowerBI.Api/Source/IPipelinesOperations.cs b/sdk/PowerBI.Api/Source/IPipelinesOperations.cs new file mode 100644 index 00000000..9c4f2141 --- /dev/null +++ b/sdk/PowerBI.Api/Source/IPipelinesOperations.cs @@ -0,0 +1,364 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api +{ + using Microsoft.Rest; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// PipelinesOperations operations. + /// + public partial interface IPipelinesOperations + { + /// + /// Returns a list of deployment pipelines the user has access to. + /// + /// + /// <br/>**Required scope**: Pipeline.Read.All or + /// Pipeline.ReadWrite.All <br/>To set the permissions scope, see + /// [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + Task> GetPipelinesWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns the specified deployment pipeline. + /// + /// + /// <br/>**Required scope**: Pipeline.ReadWrite.All or + /// Pipeline.Read.All <br/>To set the permissions scope, see + /// [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The deployment pipeline ID + /// + /// + /// Expands related entities inline, receives a comma-separated list of + /// data types. Supported: stages + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + Task> GetPipelineWithHttpMessagesAsync(System.Guid pipelineId, string expand = "stages", Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns the supported items from the workspace assigned to the + /// specified deployment pipeline stage. To learn more about items that + /// are not supported in deployment pipelines, see [unsupported + /// items](https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#unsupported-items) + /// + /// + /// **Note**: To perform this operation, the user must be at least a + /// contributor on the workspace assigned to the specified stage. For + /// more information, see + /// [permissions]([https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#permissions) + /// <br/><br/>**Required scope**: Pipeline.ReadWrite.All or + /// Pipeline.Read.All <br/>To set the permissions scope, see + /// [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The deployment pipeline ID + /// + /// + /// The deployment pipeline stage order. Development (0), Test (1), + /// Production (2). + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + Task> GetPipelineStageArtifactsWithHttpMessagesAsync(System.Guid pipelineId, int stageOrder, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns a list of up to 20 last deploy operations performed on the + /// specified deployment pipeline. + /// + /// + /// <br/>**Required scope**: Pipeline.ReadWrite.All or + /// Pipeline.Read.All <br/>To set the permissions scope, see + /// [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The deployment pipeline ID + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + Task> GetPipelineOperationsWithHttpMessagesAsync(System.Guid pipelineId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns the details of the specified deploy operation performed on + /// the specified deployment pipeline including the `executionPlan`. + /// Use to track the status of the deploy operation. + /// + /// + /// <br/>**Required scope**: Pipeline.ReadWrite.All or + /// Pipeline.Read.All <br/>To set the permissions scope, see + /// [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The deployment pipeline ID + /// + /// + /// The operation ID + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + Task> GetPipelineOperationWithHttpMessagesAsync(System.Guid pipelineId, System.Guid operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deploy all supported items from the specified deployment pipeline + /// source stage. To learn more about items that are not supported in + /// deployment pipelines, see [unsupported + /// items](https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#unsupported-items) + /// + /// + /// <br/>**Note**: To perform this operation, the user must be at + /// least a member on both workpsaces. For more information, see + /// [permissions]([https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#permissions) + /// <br/><br/>**Required scope**: Pipeline.Deploy + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app).<br/><h4>Limitations</h4><ul><li>You + /// can deploy up to 300 items per request</li></ul> + /// + /// + /// The deployment pipeline ID + /// + /// + /// The deploy request + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> DeployAllWithHttpMessagesAsync(System.Guid pipelineId, DeployAllRequest deployRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deploy the specified items from the specified deployment pipeline + /// source stage. + /// + /// + /// **Note**: To perform this operation, the user must be at least a + /// member on both workpsaces. For more information, see + /// [permissions]([https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#permissions) + /// <br/><br/>**Required scope**: Pipeline.Deploy + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app).<br/><h4>Limitations</h4><ul><li>You + /// can deploy up to 300 items per request</li></ul> + /// + /// + /// The deployment pipeline ID + /// + /// + /// The selective deploy request + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> SelectiveDeployWithHttpMessagesAsync(System.Guid pipelineId, SelectiveDeployRequest deployRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns a list of deployment pipelines for the organization. + /// + /// + /// **Note:** To call this API the user must have administrator rights. + /// Alternatively, authenticate using a service principal. + /// <br/>This API allows a maximum of 200 requests per hour. + /// <br/><br/>**Required scope**: Tenant.Read.All or + /// Tenant.ReadWrite.All. + /// + /// + /// Expands related entities inline, receives a comma-separated list of + /// data types. Supported: users, stages. + /// + /// + /// Filters the results based on a boolean condition. + /// + /// + /// Returns only the first n results. This parameter must be in the + /// range of 1-5000. + /// + /// + /// Skips the first n results. Use with top to fetch results beyond the + /// first 5000. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + Task> GetPipelinesAsAdminWithHttpMessagesAsync(string expand = default(string), string filter = default(string), int? top = default(int?), int? skip = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns a list of users that have access to a specified deployment + /// pipeline. + /// + /// + /// **Note:** To call this API the user must have administrator rights. + /// Alternatively, authenticate using a service principal. + /// <br/>This API allows a maximum of 200 requests per hour. + /// <br/><br/>**Required scope**: Tenant.Read.All or + /// Tenant.ReadWrite.All. + /// + /// + /// The deployment pipeline ID + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + Task> GetPipelineUsersAsAdminWithHttpMessagesAsync(System.Guid pipelineId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Grants user permissions to a specified deployment pipeline. + /// + /// + /// **Note:** To call this API the user must have administrator rights. + /// <br/>This API allows a maximum of 200 requests per hour. + /// <br/><br/>**Required scope**: + /// Tenant.ReadWrite.All.<br/><br/>**Limitations:** This + /// API doesn't support service principals. You cannot update service + /// principal's permissions. + /// + /// + /// The deployment pipeline ID + /// + /// + /// Details of user access right + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task UpdateUserAsAdminWithHttpMessagesAsync(System.Guid pipelineId, PipelineUser userDetails, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Remove user permissions from a specified deployment pipeline. + /// + /// + /// **Note:** To call this API the user must have administrator rights. + /// <br/>This API allows a maximum of 200 requests per hour. + /// <br/><br/>**Required scope**: + /// Tenant.ReadWrite.All.<br/><br/>**Limitations:** This + /// API doesn't support service principals. You cannot delete service + /// principal's permissions. + /// + /// + /// The deployment pipeline ID + /// + /// + /// For Principal type 'User' provide UPN , otherwise provide [Object + /// ID](/power-bi/developer/embedded/embedded-troubleshoot#what-is-the-difference-between-application-object-id-and-principal-object-id) + /// of the principal + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteUserAsAdminWithHttpMessagesAsync(System.Guid pipelineId, string identifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/PowerBI.Api/Source/IPowerBIClient.cs b/sdk/PowerBI.Api/Source/IPowerBIClient.cs index 881ab8f2..03f1a54f 100644 --- a/sdk/PowerBI.Api/Source/IPowerBIClient.cs +++ b/sdk/PowerBI.Api/Source/IPowerBIClient.cs @@ -96,6 +96,11 @@ public partial interface IPowerBIClient : System.IDisposable /// IAvailableFeaturesOperations AvailableFeatures { get; } + /// + /// Gets the IPipelinesOperations. + /// + IPipelinesOperations Pipelines { get; } + /// /// Gets the IDataflowStorageAccountsOperations. /// diff --git a/sdk/PowerBI.Api/Source/IReportsOperations.cs b/sdk/PowerBI.Api/Source/IReportsOperations.cs index b33a49a2..82477aeb 100644 --- a/sdk/PowerBI.Api/Source/IReportsOperations.cs +++ b/sdk/PowerBI.Api/Source/IReportsOperations.cs @@ -54,7 +54,7 @@ public partial interface IReportsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The report id + /// The report ID /// /// /// The headers that will be added to request. @@ -78,7 +78,7 @@ public partial interface IReportsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The report id + /// The report ID /// /// /// The headers that will be added to request. @@ -107,7 +107,7 @@ public partial interface IReportsOperations /// Target dataset (if provided) - Build permissions. /// /// - /// The report id + /// The report ID /// /// /// Clone report parameters @@ -133,8 +133,11 @@ public partial interface IReportsOperations /// file. /// /// - /// <br/>**Required scope**: Report.ReadWrite.All or - /// Report.Read.All <br/>To set the permissions scope, see + /// <br/>**Note**: As a [workaround for fixing timeout + /// issues](/power-bi/developer/embedded/embedded-troubleshoot#how-to-fix-timeout-exceptions-when-using-import-and-export-apis), + /// you can set `preferClientRouting` to + /// true.<br/><br/>**Required scope**: Report.ReadWrite.All + /// or Report.Read.All <br/>To set the permissions scope, see /// [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// <h2>Restrictions</h2>Export of a report with [Power BI @@ -145,7 +148,7 @@ public partial interface IReportsOperations /// supported.<br/> /// /// - /// The report id + /// The report ID /// /// /// The headers that will be added to request. @@ -170,7 +173,7 @@ public partial interface IReportsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The report id + /// The report ID /// /// /// UpdateReportContent parameters @@ -208,7 +211,7 @@ public partial interface IReportsOperations /// Target dataset - Build permissions. /// /// - /// The report id + /// The report ID /// /// /// Rebind report parameters @@ -237,7 +240,7 @@ public partial interface IReportsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The report id + /// The report ID /// /// /// The headers that will be added to request. @@ -263,7 +266,7 @@ public partial interface IReportsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The report id + /// The report ID /// /// /// The page name @@ -295,7 +298,7 @@ public partial interface IReportsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The report id + /// The report ID /// /// /// The headers that will be added to request. @@ -326,7 +329,7 @@ public partial interface IReportsOperations /// not supported</li></ul> /// /// - /// The report id + /// The report ID /// /// /// @@ -357,7 +360,7 @@ public partial interface IReportsOperations /// Premium Per User (PPU) is not supported. /// /// - /// The report id + /// The report ID /// /// /// Export to file request parameters @@ -389,10 +392,10 @@ public partial interface IReportsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The report id + /// The report ID /// /// - /// The export id + /// The export ID /// /// /// The headers that will be added to request. @@ -421,10 +424,10 @@ public partial interface IReportsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The report id + /// The report ID /// /// - /// The export id + /// The export ID /// /// /// The headers that will be added to request. @@ -455,7 +458,7 @@ public partial interface IReportsOperations /// displayed. /// /// - /// The workspace id + /// The workspace ID /// /// /// The headers that will be added to request. @@ -480,10 +483,10 @@ public partial interface IReportsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// The headers that will be added to request. @@ -507,10 +510,10 @@ public partial interface IReportsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// The headers that will be added to request. @@ -538,10 +541,10 @@ public partial interface IReportsOperations /// Target dataset (if provided) - Build permissions /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// Clone report parameters @@ -567,8 +570,11 @@ public partial interface IReportsOperations /// .pbix file. /// /// - /// <br/>**Required scope**: Report.ReadWrite.All or - /// Report.Read.All <br/>To set the permissions scope, see + /// <br/>**Note**: As a [workaround for fixing timeout + /// issues](/power-bi/developer/embedded/embedded-troubleshoot#how-to-fix-timeout-exceptions-when-using-import-and-export-apis), + /// you can set `preferClientRouting` to + /// true.<br/><br/>**Required scope**: Report.ReadWrite.All + /// or Report.Read.All <br/>To set the permissions scope, see /// [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// <h2>Restrictions</h2>Export of a report with [Power BI @@ -579,10 +585,10 @@ public partial interface IReportsOperations /// supported.<br/> /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// The headers that will be added to request. @@ -607,10 +613,10 @@ public partial interface IReportsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// UpdateReportContent parameters @@ -648,10 +654,10 @@ public partial interface IReportsOperations /// Target dataset - Build permissions /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// Rebind report parameters @@ -680,10 +686,10 @@ public partial interface IReportsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// The headers that will be added to request. @@ -709,10 +715,10 @@ public partial interface IReportsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// The page name @@ -744,7 +750,7 @@ public partial interface IReportsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// @@ -777,10 +783,10 @@ public partial interface IReportsOperations /// not supported</li></ul> /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// @@ -811,10 +817,10 @@ public partial interface IReportsOperations /// Premium Per User (PPU) is not supported. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// Export to file request parameters @@ -846,13 +852,13 @@ public partial interface IReportsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// - /// The export id + /// The export ID /// /// /// The headers that will be added to request. @@ -881,13 +887,13 @@ public partial interface IReportsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// - /// The export id + /// The export ID /// /// /// The headers that will be added to request. @@ -931,7 +937,7 @@ public partial interface IReportsOperations /// [Rebind](/rest/api/power-bi/reports/RebindReport).<br/> /// /// - /// The workspace id + /// The workspace ID /// /// /// Generate token parameters @@ -980,10 +986,10 @@ public partial interface IReportsOperations /// [Rebind](/rest/api/power-bi/reports/RebindReport).<br/> /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// Generate token parameters @@ -1019,7 +1025,7 @@ public partial interface IReportsOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Filters the results, based on a boolean condition @@ -1080,6 +1086,37 @@ public partial interface IReportsOperations /// Task> GetReportsAsAdminWithHttpMessagesAsync(string filter = default(string), int? top = default(int?), int? skip = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Returns a list of users that have access to the specified report + /// (Preview). + /// + /// + /// **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/>Delegated permissions are + /// supported. <br/>To set the permissions scope, see [Register + /// an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The report ID + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + Task> GetReportUsersAsAdminWithHttpMessagesAsync(System.Guid reportId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Transfers ownership over the specified paginated report datasources /// to the current authorized user. /// @@ -1090,10 +1127,10 @@ public partial interface IReportsOperations /// report datasources supports only paginated reports</li> /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// The headers that will be added to request. diff --git a/sdk/PowerBI.Api/Source/ITilesOperations.cs b/sdk/PowerBI.Api/Source/ITilesOperations.cs index a4570c0d..95e4af4c 100644 --- a/sdk/PowerBI.Api/Source/ITilesOperations.cs +++ b/sdk/PowerBI.Api/Source/ITilesOperations.cs @@ -40,13 +40,13 @@ public partial interface ITilesOperations /// document along with considerations and limitations section. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dashboard id + /// The dashboard ID /// /// - /// The tile id + /// The tile ID /// /// /// Generate token parameters diff --git a/sdk/PowerBI.Api/Source/IUsers.cs b/sdk/PowerBI.Api/Source/IUsers.cs index 86da8395..a1f42750 100644 --- a/sdk/PowerBI.Api/Source/IUsers.cs +++ b/sdk/PowerBI.Api/Source/IUsers.cs @@ -47,5 +47,36 @@ public partial interface IUsers /// Thrown when the operation returned an invalid status code /// Task RefreshUserPermissionsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns a list of artifacts that the given user have access to + /// (Preview). + /// + /// + /// This API allows 200 requests per hour at maximum. + /// <br/><br/>**Required scope**: Tenant.Read.All or + /// Tenant.ReadWrite.All. <br/>Delegated permissions are + /// supported. <br/>To set the permissions scope, see [Register + /// an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The graph ID of user + /// + /// + /// Token required to get the next chunk of the result set + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + Task> GetUserArtifactAccessAsAdminWithHttpMessagesAsync(System.Guid userGraphId, string continuationToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/PowerBI.Api/Source/IWorkspaceInfoOperations.cs b/sdk/PowerBI.Api/Source/IWorkspaceInfoOperations.cs index 1f2cff78..e897e2ec 100644 --- a/sdk/PowerBI.Api/Source/IWorkspaceInfoOperations.cs +++ b/sdk/PowerBI.Api/Source/IWorkspaceInfoOperations.cs @@ -27,7 +27,8 @@ public partial interface IWorkspaceInfoOperations /// Microsoft 365 Global Administrator or Power BI Service /// Administrator) to call this API or authenticate via service /// principal. <br/>This API allows a maximum of 500 requests per - /// hour. <br/><br/>**Required scope**: Tenant.Read.All or + /// hour, and not more than 16 simultaneously. + /// <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). @@ -42,6 +43,16 @@ public partial interface IWorkspaceInfoOperations /// /// Whether to return datasource details​ /// + /// + /// Whether to return dataset schema (Tables, Columns and Measures)​ + /// + /// + /// Whether to return dataset expressions (Dax query and Mashup)​ + /// + /// + /// Whether to return artifact user details​ (Preview) (Permission + /// level) + /// /// /// The headers that will be added to request. /// @@ -57,7 +68,7 @@ public partial interface IWorkspaceInfoOperations /// /// Thrown when a required parameter is null /// - Task> PostWorkspaceInfoWithHttpMessagesAsync(RequiredWorkspaces requiredWorkspaces, bool? lineage = default(bool?), bool? datasourceDetails = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> PostWorkspaceInfoWithHttpMessagesAsync(RequiredWorkspaces requiredWorkspaces, bool? lineage = default(bool?), bool? datasourceDetails = default(bool?), bool? datasetSchema = default(bool?), bool? datasetExpressions = default(bool?), bool? getArtifactUsers = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets scan status for the specified scan. (Preview) /// @@ -72,6 +83,8 @@ public partial interface IWorkspaceInfoOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// + /// The scan ID, which is included in the response from the workspaces + /// or getInfo API that triggered the scan /// /// /// The headers that will be added to request. @@ -102,6 +115,8 @@ public partial interface IWorkspaceInfoOperations /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// + /// The scan ID, which is included in the response from the workspaces + /// or getInfo API that triggered the scan /// /// /// The headers that will be added to request. @@ -138,6 +153,9 @@ public partial interface IWorkspaceInfoOperations /// /// Last modified date​ (must be in ISO 8601 compliant UTC format) /// + /// + /// Whether to exclude personal workspaces​ + /// /// /// The headers that will be added to request. /// @@ -150,6 +168,6 @@ public partial interface IWorkspaceInfoOperations /// /// Thrown when unable to deserialize the response /// - Task> GetModifiedWorkspacesWithHttpMessagesAsync(System.DateTime? modifiedSince = default(System.DateTime?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetModifiedWorkspacesWithHttpMessagesAsync(System.DateTime? modifiedSince = default(System.DateTime?), bool? excludePersonalWorkspaces = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/PowerBI.Api/Source/ImportsOperations.cs b/sdk/PowerBI.Api/Source/ImportsOperations.cs index 6f70a980..01d88364 100644 --- a/sdk/PowerBI.Api/Source/ImportsOperations.cs +++ b/sdk/PowerBI.Api/Source/ImportsOperations.cs @@ -219,6 +219,14 @@ public ImportsOperations(PowerBIClient client) /// Determines whether to skip report import, if specified value must be /// 'true'. Only supported for PBIX files. /// + /// + /// Determines whether to override existing label on report during republish of + /// PBIX file, service default value is true. + /// + /// + /// Determines whether to override existing label on model during republish of + /// PBIX file, service default value is true. + /// /// /// Headers that will be added to request. /// @@ -240,7 +248,7 @@ public ImportsOperations(PowerBIClient client) /// /// A response object containing the response body and response headers. /// - public async Task> PostImportWithHttpMessagesAsync(string datasetDisplayName, ImportInfo importInfo, ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> PostImportWithHttpMessagesAsync(string datasetDisplayName, ImportInfo importInfo, ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), bool? overrideReportLabel = default(bool?), bool? overrideModelLabel = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (datasetDisplayName == null) { @@ -260,6 +268,8 @@ public ImportsOperations(PowerBIClient client) tracingParameters.Add("datasetDisplayName", datasetDisplayName); tracingParameters.Add("nameConflict", nameConflict); tracingParameters.Add("skipReport", skipReport); + tracingParameters.Add("overrideReportLabel", overrideReportLabel); + tracingParameters.Add("overrideModelLabel", overrideModelLabel); tracingParameters.Add("importInfo", importInfo); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "PostImport", tracingParameters); @@ -280,6 +290,14 @@ public ImportsOperations(PowerBIClient client) { _queryParameters.Add(string.Format("skipReport={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(skipReport, Client.SerializationSettings).Trim('"')))); } + if (overrideReportLabel != null) + { + _queryParameters.Add(string.Format("overrideReportLabel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(overrideReportLabel, Client.SerializationSettings).Trim('"')))); + } + if (overrideModelLabel != null) + { + _queryParameters.Add(string.Format("overrideModelLabel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(overrideModelLabel, Client.SerializationSettings).Trim('"')))); + } if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); @@ -410,7 +428,7 @@ public ImportsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The import id + /// The import ID /// /// /// Headers that will be added to request. @@ -687,7 +705,7 @@ public ImportsOperations(PowerBIClient client) /// .pbix file from OneDrive is not supported.</li> /// /// - /// The workspace id + /// The workspace ID /// /// /// Headers that will be added to request. @@ -840,7 +858,7 @@ public ImportsOperations(PowerBIClient client) /// not supported for dataflows with service principal. /// /// - /// The workspace id + /// The workspace ID /// /// /// The display name of the dataset should include file extension. Not @@ -861,6 +879,14 @@ public ImportsOperations(PowerBIClient client) /// Determines whether to skip report import, if specified value must be /// 'true'. Only supported for PBIX files. /// + /// + /// Determines whether to override existing label on report during republish of + /// PBIX file, service default value is true. + /// + /// + /// Determines whether to override existing label on model during republish of + /// PBIX file, service default value is true. + /// /// /// Headers that will be added to request. /// @@ -882,7 +908,7 @@ public ImportsOperations(PowerBIClient client) /// /// A response object containing the response body and response headers. /// - public async Task> PostImportInGroupWithHttpMessagesAsync(System.Guid groupId, string datasetDisplayName, ImportInfo importInfo, ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> PostImportInGroupWithHttpMessagesAsync(System.Guid groupId, string datasetDisplayName, ImportInfo importInfo, ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), bool? overrideReportLabel = default(bool?), bool? overrideModelLabel = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (datasetDisplayName == null) { @@ -903,6 +929,8 @@ public ImportsOperations(PowerBIClient client) tracingParameters.Add("datasetDisplayName", datasetDisplayName); tracingParameters.Add("nameConflict", nameConflict); tracingParameters.Add("skipReport", skipReport); + tracingParameters.Add("overrideReportLabel", overrideReportLabel); + tracingParameters.Add("overrideModelLabel", overrideModelLabel); tracingParameters.Add("importInfo", importInfo); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "PostImportInGroup", tracingParameters); @@ -924,6 +952,14 @@ public ImportsOperations(PowerBIClient client) { _queryParameters.Add(string.Format("skipReport={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(skipReport, Client.SerializationSettings).Trim('"')))); } + if (overrideReportLabel != null) + { + _queryParameters.Add(string.Format("overrideReportLabel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(overrideReportLabel, Client.SerializationSettings).Trim('"')))); + } + if (overrideModelLabel != null) + { + _queryParameters.Add(string.Format("overrideModelLabel={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(overrideModelLabel, Client.SerializationSettings).Trim('"')))); + } if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); @@ -1054,10 +1090,10 @@ public ImportsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The import id + /// The import ID /// /// /// Headers that will be added to request. @@ -1204,7 +1240,7 @@ public ImportsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Headers that will be added to request. diff --git a/sdk/PowerBI.Api/Source/ImportsOperationsExtensions.cs b/sdk/PowerBI.Api/Source/ImportsOperationsExtensions.cs index 64eda9d2..95d6db04 100644 --- a/sdk/PowerBI.Api/Source/ImportsOperationsExtensions.cs +++ b/sdk/PowerBI.Api/Source/ImportsOperationsExtensions.cs @@ -98,9 +98,17 @@ public static Imports GetImports(this IImportsOperations operations) /// Determines whether to skip report import, if specified value must be /// 'true'. Only supported for PBIX files. /// - public static Import PostImport(this IImportsOperations operations, string datasetDisplayName, ImportInfo importInfo, ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?)) + /// + /// Determines whether to override existing label on report during republish of + /// PBIX file, service default value is true. + /// + /// + /// Determines whether to override existing label on model during republish of + /// PBIX file, service default value is true. + /// + public static Import PostImport(this IImportsOperations operations, string datasetDisplayName, ImportInfo importInfo, ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), bool? overrideReportLabel = default(bool?), bool? overrideModelLabel = default(bool?)) { - return operations.PostImportAsync(datasetDisplayName, importInfo, nameConflict, skipReport).GetAwaiter().GetResult(); + return operations.PostImportAsync(datasetDisplayName, importInfo, nameConflict, skipReport, overrideReportLabel, overrideModelLabel).GetAwaiter().GetResult(); } /// @@ -148,12 +156,20 @@ public static Imports GetImports(this IImportsOperations operations) /// Determines whether to skip report import, if specified value must be /// 'true'. Only supported for PBIX files. /// + /// + /// Determines whether to override existing label on report during republish of + /// PBIX file, service default value is true. + /// + /// + /// Determines whether to override existing label on model during republish of + /// PBIX file, service default value is true. + /// /// /// The cancellation token. /// - public static async Task PostImportAsync(this IImportsOperations operations, string datasetDisplayName, ImportInfo importInfo, ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task PostImportAsync(this IImportsOperations operations, string datasetDisplayName, ImportInfo importInfo, ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), bool? overrideReportLabel = default(bool?), bool? overrideModelLabel = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.PostImportWithHttpMessagesAsync(datasetDisplayName, importInfo, nameConflict, skipReport, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.PostImportWithHttpMessagesAsync(datasetDisplayName, importInfo, nameConflict, skipReport, overrideReportLabel, overrideModelLabel, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -171,7 +187,7 @@ public static Imports GetImports(this IImportsOperations operations) /// The operations group for this extension method. /// /// - /// The import id + /// The import ID /// public static Import GetImport(this IImportsOperations operations, System.Guid importId) { @@ -190,7 +206,7 @@ public static Import GetImport(this IImportsOperations operations, System.Guid i /// The operations group for this extension method. /// /// - /// The import id + /// The import ID /// /// /// The cancellation token. @@ -272,7 +288,7 @@ public static TemporaryUploadLocation CreateTemporaryUploadLocation(this IImport /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// public static Imports GetImportsInGroup(this IImportsOperations operations, System.Guid groupId) { @@ -292,7 +308,7 @@ public static Imports GetImportsInGroup(this IImportsOperations operations, Syst /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// The cancellation token. @@ -334,7 +350,7 @@ public static Imports GetImportsInGroup(this IImportsOperations operations, Syst /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// The display name of the dataset should include file extension. Not @@ -355,9 +371,17 @@ public static Imports GetImportsInGroup(this IImportsOperations operations, Syst /// Determines whether to skip report import, if specified value must be /// 'true'. Only supported for PBIX files. /// - public static Import PostImportInGroup(this IImportsOperations operations, System.Guid groupId, string datasetDisplayName, ImportInfo importInfo, ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?)) + /// + /// Determines whether to override existing label on report during republish of + /// PBIX file, service default value is true. + /// + /// + /// Determines whether to override existing label on model during republish of + /// PBIX file, service default value is true. + /// + public static Import PostImportInGroup(this IImportsOperations operations, System.Guid groupId, string datasetDisplayName, ImportInfo importInfo, ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), bool? overrideReportLabel = default(bool?), bool? overrideModelLabel = default(bool?)) { - return operations.PostImportInGroupAsync(groupId, datasetDisplayName, importInfo, nameConflict, skipReport).GetAwaiter().GetResult(); + return operations.PostImportInGroupAsync(groupId, datasetDisplayName, importInfo, nameConflict, skipReport, overrideReportLabel, overrideModelLabel).GetAwaiter().GetResult(); } /// @@ -389,7 +413,7 @@ public static Imports GetImportsInGroup(this IImportsOperations operations, Syst /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// The display name of the dataset should include file extension. Not @@ -410,12 +434,20 @@ public static Imports GetImportsInGroup(this IImportsOperations operations, Syst /// Determines whether to skip report import, if specified value must be /// 'true'. Only supported for PBIX files. /// + /// + /// Determines whether to override existing label on report during republish of + /// PBIX file, service default value is true. + /// + /// + /// Determines whether to override existing label on model during republish of + /// PBIX file, service default value is true. + /// /// /// The cancellation token. /// - public static async Task PostImportInGroupAsync(this IImportsOperations operations, System.Guid groupId, string datasetDisplayName, ImportInfo importInfo, ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task PostImportInGroupAsync(this IImportsOperations operations, System.Guid groupId, string datasetDisplayName, ImportInfo importInfo, ImportConflictHandlerMode? nameConflict = default(ImportConflictHandlerMode?), bool? skipReport = default(bool?), bool? overrideReportLabel = default(bool?), bool? overrideModelLabel = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.PostImportInGroupWithHttpMessagesAsync(groupId, datasetDisplayName, importInfo, nameConflict, skipReport, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.PostImportInGroupWithHttpMessagesAsync(groupId, datasetDisplayName, importInfo, nameConflict, skipReport, overrideReportLabel, overrideModelLabel, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -433,10 +465,10 @@ public static Imports GetImportsInGroup(this IImportsOperations operations, Syst /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The import id + /// The import ID /// public static Import GetImportInGroup(this IImportsOperations operations, System.Guid groupId, System.Guid importId) { @@ -455,10 +487,10 @@ public static Import GetImportInGroup(this IImportsOperations operations, System /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The import id + /// The import ID /// /// /// The cancellation token. @@ -492,7 +524,7 @@ public static Import GetImportInGroup(this IImportsOperations operations, System /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// public static TemporaryUploadLocation CreateTemporaryUploadLocationInGroup(this IImportsOperations operations, System.Guid groupId) { @@ -520,7 +552,7 @@ public static TemporaryUploadLocation CreateTemporaryUploadLocationInGroup(this /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// The cancellation token. diff --git a/sdk/PowerBI.Api/Source/InformationProtection.cs b/sdk/PowerBI.Api/Source/InformationProtection.cs index 992060f0..d1b31e39 100644 --- a/sdk/PowerBI.Api/Source/InformationProtection.cs +++ b/sdk/PowerBI.Api/Source/InformationProtection.cs @@ -56,10 +56,12 @@ public InformationProtection(PowerBIClient client) /// rights](https://go.microsoft.com/fwlink/?linkid=2157685) to delete /// labels.<br/>This API allows a maximum of 25 requests per hour. Each /// request can update up to 2000 artifacts. <br/><br/>**Required - /// scope**: Tenant.ReadWrite.All + /// scope**: Tenant.ReadWrite.All <br/><br/>**Usage sample**: [Set + /// or remove sensitivity labels using Power BI REST admin + /// APIs](https://docs.microsoft.com/power-bi/admin/service-security-sensitivity-label-inheritance-set-remove-api) /// /// - /// Composite of artifact Id lists per Type. + /// A composite of artifact ID lists for each type /// /// /// Headers that will be added to request. @@ -216,6 +218,9 @@ public InformationProtection(PowerBIClient client) /// to set labels.<br/>This API allows a maximum of 25 requests per hour. /// Each request can update up to 2000 artifacts. /// <br/><br/>**Required scope**: Tenant.ReadWrite.All + /// <br/><br/>**Usage sample**: [Set or remove sensitivity labels + /// using Power BI REST admin + /// APIs](https://docs.microsoft.com/power-bi/admin/service-security-sensitivity-label-inheritance-set-remove-api) /// /// /// Set label details. diff --git a/sdk/PowerBI.Api/Source/InformationProtectionExtensions.cs b/sdk/PowerBI.Api/Source/InformationProtectionExtensions.cs index 03923cf8..fe090f0d 100644 --- a/sdk/PowerBI.Api/Source/InformationProtectionExtensions.cs +++ b/sdk/PowerBI.Api/Source/InformationProtectionExtensions.cs @@ -25,13 +25,15 @@ public static partial class InformationProtectionExtensions /// rights](https://go.microsoft.com/fwlink/?linkid=2157685) to delete /// labels.<br/>This API allows a maximum of 25 requests per hour. Each /// request can update up to 2000 artifacts. <br/><br/>**Required - /// scope**: Tenant.ReadWrite.All + /// scope**: Tenant.ReadWrite.All <br/><br/>**Usage sample**: [Set + /// or remove sensitivity labels using Power BI REST admin + /// APIs](https://docs.microsoft.com/power-bi/admin/service-security-sensitivity-label-inheritance-set-remove-api) /// /// /// The operations group for this extension method. /// /// - /// Composite of artifact Id lists per Type. + /// A composite of artifact ID lists for each type /// public static InformationProtectionChangeLabelResponse RemoveLabelsAsAdmin(this IInformationProtection operations, InformationProtectionArtifactsChangeLabel artifacts) { @@ -48,13 +50,15 @@ public static InformationProtectionChangeLabelResponse RemoveLabelsAsAdmin(this /// rights](https://go.microsoft.com/fwlink/?linkid=2157685) to delete /// labels.<br/>This API allows a maximum of 25 requests per hour. Each /// request can update up to 2000 artifacts. <br/><br/>**Required - /// scope**: Tenant.ReadWrite.All + /// scope**: Tenant.ReadWrite.All <br/><br/>**Usage sample**: [Set + /// or remove sensitivity labels using Power BI REST admin + /// APIs](https://docs.microsoft.com/power-bi/admin/service-security-sensitivity-label-inheritance-set-remove-api) /// /// /// The operations group for this extension method. /// /// - /// Composite of artifact Id lists per Type. + /// A composite of artifact ID lists for each type /// /// /// The cancellation token. @@ -82,6 +86,9 @@ public static InformationProtectionChangeLabelResponse RemoveLabelsAsAdmin(this /// to set labels.<br/>This API allows a maximum of 25 requests per hour. /// Each request can update up to 2000 artifacts. /// <br/><br/>**Required scope**: Tenant.ReadWrite.All + /// <br/><br/>**Usage sample**: [Set or remove sensitivity labels + /// using Power BI REST admin + /// APIs](https://docs.microsoft.com/power-bi/admin/service-security-sensitivity-label-inheritance-set-remove-api) /// /// /// The operations group for this extension method. @@ -109,6 +116,9 @@ public static InformationProtectionChangeLabelResponse SetLabelsAsAdmin(this IIn /// to set labels.<br/>This API allows a maximum of 25 requests per hour. /// Each request can update up to 2000 artifacts. /// <br/><br/>**Required scope**: Tenant.ReadWrite.All + /// <br/><br/>**Usage sample**: [Set or remove sensitivity labels + /// using Power BI REST admin + /// APIs](https://docs.microsoft.com/power-bi/admin/service-security-sensitivity-label-inheritance-set-remove-api) /// /// /// The operations group for this extension method. diff --git a/sdk/PowerBI.Api/Source/Models/ASMashupExpression.cs b/sdk/PowerBI.Api/Source/Models/ASMashupExpression.cs new file mode 100644 index 00000000..6fb90bbf --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/ASMashupExpression.cs @@ -0,0 +1,61 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A dataset table source + /// + public partial class ASMashupExpression + { + /// + /// Initializes a new instance of the ASMashupExpression class. + /// + public ASMashupExpression() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ASMashupExpression class. + /// + /// The source expression + public ASMashupExpression(string expression) + { + Expression = expression; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the source expression + /// + [JsonProperty(PropertyName = "expression")] + public string Expression { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Expression == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Expression"); + } + } + } +} diff --git a/sdk/PowerBI.Api/Source/Models/ActivityEventResponse.cs b/sdk/PowerBI.Api/Source/Models/ActivityEventResponse.cs index 7f7913c8..818d665c 100644 --- a/sdk/PowerBI.Api/Source/Models/ActivityEventResponse.cs +++ b/sdk/PowerBI.Api/Source/Models/ActivityEventResponse.cs @@ -29,7 +29,7 @@ public ActivityEventResponse() /// /// The activity event /// entities - /// Uri to get the next chunk of the + /// The URI for the next chunk in the /// result set /// Token to get the next chunk of the /// result set @@ -53,7 +53,7 @@ public ActivityEventResponse() public IList ActivityEventEntities { get; set; } /// - /// Gets or sets uri to get the next chunk of the result set + /// Gets or sets the URI for the next chunk in the result set /// [JsonProperty(PropertyName = "continuationUri")] public string ContinuationUri { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/App.cs b/sdk/PowerBI.Api/Source/Models/App.cs index 6ac56ff3..24fe43b3 100644 --- a/sdk/PowerBI.Api/Source/Models/App.cs +++ b/sdk/PowerBI.Api/Source/Models/App.cs @@ -25,7 +25,7 @@ public App() /// /// Initializes a new instance of the App class. /// - /// The app id + /// The app ID /// The app name /// The app description /// The last time the app was updated @@ -46,7 +46,7 @@ public App() partial void CustomInit(); /// - /// Gets or sets the app id + /// Gets or sets the app ID /// [JsonProperty(PropertyName = "id")] public System.Guid Id { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/AppUser.cs b/sdk/PowerBI.Api/Source/Models/AppUser.cs new file mode 100644 index 00000000..a3c43527 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/AppUser.cs @@ -0,0 +1,109 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// A Power BI user access right entry for app + /// + public partial class AppUser + { + /// + /// Initializes a new instance of the AppUser class. + /// + public AppUser() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AppUser class. + /// + /// Access rights user has for the + /// app. Possible values include: 'None', 'Read', 'ReadWrite', + /// 'ReadReshare', 'ReadWriteReshare', 'ReadExplore', 'ReadCopy', + /// 'ReadExploreCopy', 'ReadReshareExploreCopy', 'ReadReshareExplore', + /// 'ReadWriteExplore', 'ReadWriteReshareExplore', + /// 'ReadWriteExploreCopy', 'All' + /// Email address of the user + /// Display name of the principal + /// Identifier of the principal + /// Identifier of the principal in Microsoft + /// Graph. Only available for admin APIs. + /// Possible values include: 'None', + /// 'User', 'Group', 'App' + public AppUser(AppUserAccessRight appUserAccessRight, string emailAddress = default(string), string displayName = default(string), string identifier = default(string), string graphId = default(string), PrincipalType? principalType = default(PrincipalType?)) + { + AppUserAccessRight = appUserAccessRight; + EmailAddress = emailAddress; + DisplayName = displayName; + Identifier = identifier; + GraphId = graphId; + PrincipalType = principalType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets access rights user has for the app. Possible values + /// include: 'None', 'Read', 'ReadWrite', 'ReadReshare', + /// 'ReadWriteReshare', 'ReadExplore', 'ReadCopy', 'ReadExploreCopy', + /// 'ReadReshareExploreCopy', 'ReadReshareExplore', 'ReadWriteExplore', + /// 'ReadWriteReshareExplore', 'ReadWriteExploreCopy', 'All' + /// + [JsonProperty(PropertyName = "appUserAccessRight")] + public AppUserAccessRight AppUserAccessRight { get; set; } + + /// + /// Gets or sets email address of the user + /// + [JsonProperty(PropertyName = "emailAddress")] + public string EmailAddress { get; set; } + + /// + /// Gets or sets display name of the principal + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets identifier of the principal + /// + [JsonProperty(PropertyName = "identifier")] + public string Identifier { get; set; } + + /// + /// Gets or sets identifier of the principal in Microsoft Graph. Only + /// available for admin APIs. + /// + [JsonProperty(PropertyName = "graphId")] + public string GraphId { get; set; } + + /// + /// Gets or sets possible values include: 'None', 'User', 'Group', + /// 'App' + /// + [JsonProperty(PropertyName = "principalType")] + public PrincipalType? PrincipalType { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/sdk/PowerBI.Api/Source/Models/AppUserAccessRight.cs b/sdk/PowerBI.Api/Source/Models/AppUserAccessRight.cs new file mode 100644 index 00000000..82eccd3d --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/AppUserAccessRight.cs @@ -0,0 +1,168 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + + /// + /// Defines values for AppUserAccessRight. + /// + /// + /// Determine base value for a given allowed value if exists, else return + /// the value itself + /// + [JsonConverter(typeof(AppUserAccessRightConverter))] + public struct AppUserAccessRight : System.IEquatable + { + private AppUserAccessRight(string underlyingValue) + { + UnderlyingValue=underlyingValue; + } + + /// + /// No permission to content in app + /// + public static readonly AppUserAccessRight None = "None"; + + /// + /// Grants Read access to content in app + /// + public static readonly AppUserAccessRight Read = "Read"; + + /// + /// Grants Read and Write access to content in app + /// + public static readonly AppUserAccessRight ReadWrite = "ReadWrite"; + + /// + /// Grants Read and Reshare access to content in app + /// + public static readonly AppUserAccessRight ReadReshare = "ReadReshare"; + + /// + /// Grants Read, Write and Reshare access to content in app + /// + public static readonly AppUserAccessRight ReadWriteReshare = "ReadWriteReshare"; + + /// + /// Grants Read and Explore access to content in app + /// + public static readonly AppUserAccessRight ReadExplore = "ReadExplore"; + + /// + /// Grants Read and Copy access to content in app + /// + public static readonly AppUserAccessRight ReadCopy = "ReadCopy"; + + /// + /// Grants Read, Explore and Copy access to content in app + /// + public static readonly AppUserAccessRight ReadExploreCopy = "ReadExploreCopy"; + + /// + /// Grants Read, Reshare, Explore and Copy access to content in app + /// + public static readonly AppUserAccessRight ReadReshareExploreCopy = "ReadReshareExploreCopy"; + + /// + /// Grants Read, Reshare and Explore access to content in app + /// + public static readonly AppUserAccessRight ReadReshareExplore = "ReadReshareExplore"; + + /// + /// Grants Read, Write and Explore access to content in app + /// + public static readonly AppUserAccessRight ReadWriteExplore = "ReadWriteExplore"; + + /// + /// Grants Read, Write, Reshare and Explore access to content in app + /// + public static readonly AppUserAccessRight ReadWriteReshareExplore = "ReadWriteReshareExplore"; + + /// + /// Grants Read, Write, Explore and Copy access to content in app + /// + public static readonly AppUserAccessRight ReadWriteExploreCopy = "ReadWriteExploreCopy"; + + /// + /// Grants Read, Write, Explore, Reshare and Copy access to content in + /// app + /// + public static readonly AppUserAccessRight All = "All"; + + + /// + /// Underlying value of enum AppUserAccessRight + /// + private readonly string UnderlyingValue; + + /// + /// Returns string representation for AppUserAccessRight + /// + public override string ToString() + { + return UnderlyingValue.ToString(); + } + + /// + /// Compares enums of type AppUserAccessRight + /// + public bool Equals(AppUserAccessRight e) + { + return UnderlyingValue.Equals(e.UnderlyingValue); + } + + /// + /// Implicit operator to convert string to AppUserAccessRight + /// + public static implicit operator AppUserAccessRight(string value) + { + return new AppUserAccessRight(value); + } + + /// + /// Implicit operator to convert AppUserAccessRight to string + /// + public static implicit operator string(AppUserAccessRight e) + { + return e.UnderlyingValue; + } + + /// + /// Overriding == operator for enum AppUserAccessRight + /// + public static bool operator == (AppUserAccessRight e1, AppUserAccessRight e2) + { + return e2.Equals(e1); + } + + /// + /// Overriding != operator for enum AppUserAccessRight + /// + public static bool operator != (AppUserAccessRight e1, AppUserAccessRight e2) + { + return !e2.Equals(e1); + } + + /// + /// Overrides Equals operator for AppUserAccessRight + /// + public override bool Equals(object obj) + { + return obj is AppUserAccessRight && Equals((AppUserAccessRight)obj); + } + + /// + /// Returns for hashCode AppUserAccessRight + /// + public override int GetHashCode() + { + return UnderlyingValue.GetHashCode(); + } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/AppUserAccessRightConverter.cs b/sdk/PowerBI.Api/Source/Models/AppUserAccessRightConverter.cs new file mode 100644 index 00000000..3547608f --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/AppUserAccessRightConverter.cs @@ -0,0 +1,49 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + + using System.Reflection; + + /// + /// Defines values for AppUserAccessRight. + /// + public sealed class AppUserAccessRightConverter : JsonConverter + { + + /// + /// Returns if objectType can be converted to AppUserAccessRight by the + /// converter. + /// + public override bool CanConvert(System.Type objectType) + { + return typeof(AppUserAccessRight).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); + } + + /// + /// Overrides ReadJson and converts token to AppUserAccessRight. + /// + public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) + { + if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) + { + return null; + } + return (AppUserAccessRight)serializer.Deserialize(reader); + } + + /// + /// Overriding WriteJson for AppUserAccessRight for serialization. + /// + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteValue(value.ToString()); + } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/AppUsers.cs b/sdk/PowerBI.Api/Source/Models/AppUsers.cs new file mode 100644 index 00000000..ed3127fe --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/AppUsers.cs @@ -0,0 +1,55 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Odata response wrapper for a Power BI user access right for app List + /// + public partial class AppUsers + { + /// + /// Initializes a new instance of the AppUsers class. + /// + public AppUsers() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AppUsers class. + /// + /// The user access right for app List + public AppUsers(string odatacontext = default(string), IList value = default(IList)) + { + Odatacontext = odatacontext; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "odata.context")] + public string Odatacontext { get; set; } + + /// + /// Gets or sets the user access right for app List + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/ArtifactAccessEntry.cs b/sdk/PowerBI.Api/Source/Models/ArtifactAccessEntry.cs new file mode 100644 index 00000000..ab9fb8ad --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/ArtifactAccessEntry.cs @@ -0,0 +1,98 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A Power BI artifact access entry for user + /// + public partial class ArtifactAccessEntry + { + /// + /// Initializes a new instance of the ArtifactAccessEntry class. + /// + public ArtifactAccessEntry() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ArtifactAccessEntry class. + /// + /// Artifact ID + /// Display name of the artifact + /// Type of the artifact + /// Access right that the user has for the + /// artifact. + public ArtifactAccessEntry(string artifactId, string displayName, string artifactType, string accessRight) + { + ArtifactId = artifactId; + DisplayName = displayName; + ArtifactType = artifactType; + AccessRight = accessRight; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets artifact ID + /// + [JsonProperty(PropertyName = "artifactId")] + public string ArtifactId { get; set; } + + /// + /// Gets or sets display name of the artifact + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets type of the artifact + /// + [JsonProperty(PropertyName = "artifactType")] + public string ArtifactType { get; set; } + + /// + /// Gets or sets access right that the user has for the artifact. + /// + [JsonProperty(PropertyName = "accessRight")] + public string AccessRight { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ArtifactId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ArtifactId"); + } + if (DisplayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DisplayName"); + } + if (ArtifactType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ArtifactType"); + } + if (AccessRight == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AccessRight"); + } + } + } +} diff --git a/sdk/PowerBI.Api/Source/Models/ArtifactAccessResponse.cs b/sdk/PowerBI.Api/Source/Models/ArtifactAccessResponse.cs new file mode 100644 index 00000000..ffa51255 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/ArtifactAccessResponse.cs @@ -0,0 +1,73 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Odata response wrapper for a Power BI artifact access list for user + /// + public partial class ArtifactAccessResponse + { + /// + /// Initializes a new instance of the ArtifactAccessResponse class. + /// + public ArtifactAccessResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ArtifactAccessResponse class. + /// + /// The artifact access list for user + /// The URI for the next chunk in the + /// result set + /// Token to get the next chunk of the + /// result set + public ArtifactAccessResponse(string odatacontext = default(string), IList value = default(IList), string continuationUri = default(string), string continuationToken = default(string)) + { + Odatacontext = odatacontext; + Value = value; + ContinuationUri = continuationUri; + ContinuationToken = continuationToken; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "odata.context")] + public string Odatacontext { get; set; } + + /// + /// Gets or sets the artifact access list for user + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + /// + /// Gets or sets the URI for the next chunk in the result set + /// + [JsonProperty(PropertyName = "continuationUri")] + public string ContinuationUri { get; set; } + + /// + /// Gets or sets token to get the next chunk of the result set + /// + [JsonProperty(PropertyName = "continuationToken")] + public string ContinuationToken { get; set; } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/ArtifactId.cs b/sdk/PowerBI.Api/Source/Models/ArtifactId.cs index 30f68e8f..b5879ccc 100644 --- a/sdk/PowerBI.Api/Source/Models/ArtifactId.cs +++ b/sdk/PowerBI.Api/Source/Models/ArtifactId.cs @@ -10,7 +10,8 @@ namespace Microsoft.PowerBI.Api.Models using System.Linq; /// - /// Unique artifact ID: uuid format for dashboards/reports/dataflows. + /// The unique ID of an artifact, which is in UUID format for dashboards, + /// reports, and dataflows /// public partial class ArtifactId { diff --git a/sdk/PowerBI.Api/Source/Models/ArtifactStringId.cs b/sdk/PowerBI.Api/Source/Models/ArtifactStringId.cs index 8aa272bb..694552bd 100644 --- a/sdk/PowerBI.Api/Source/Models/ArtifactStringId.cs +++ b/sdk/PowerBI.Api/Source/Models/ArtifactStringId.cs @@ -11,7 +11,8 @@ namespace Microsoft.PowerBI.Api.Models using System.Linq; /// - /// Unique artifact ID: string format (can be uuid) for datasets. + /// The unique ID of an artifact, which is in string or UUID format for + /// datasets /// public partial class ArtifactStringId { diff --git a/sdk/PowerBI.Api/Source/Models/AssignToCapacityRequest.cs b/sdk/PowerBI.Api/Source/Models/AssignToCapacityRequest.cs index e28ae6f1..8cb1de40 100644 --- a/sdk/PowerBI.Api/Source/Models/AssignToCapacityRequest.cs +++ b/sdk/PowerBI.Api/Source/Models/AssignToCapacityRequest.cs @@ -25,9 +25,9 @@ public AssignToCapacityRequest() /// /// Initializes a new instance of the AssignToCapacityRequest class. /// - /// The capacity id. To unassign from - /// capacity, use Empty Guid - /// (00000000-0000-0000-0000-000000000000). + /// The capacity ID. To unassign from + /// capacity, use an Empty Guid + /// (`00000000-0000-0000-0000-000000000000`). public AssignToCapacityRequest(System.Guid capacityId) { CapacityId = capacityId; @@ -40,8 +40,8 @@ public AssignToCapacityRequest(System.Guid capacityId) partial void CustomInit(); /// - /// Gets or sets the capacity id. To unassign from capacity, use Empty - /// Guid (00000000-0000-0000-0000-000000000000). + /// Gets or sets the capacity ID. To unassign from capacity, use an + /// Empty Guid (`00000000-0000-0000-0000-000000000000`). /// [JsonProperty(PropertyName = "capacityId")] public System.Guid CapacityId { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/AssignToDataflowStorageRequest.cs b/sdk/PowerBI.Api/Source/Models/AssignToDataflowStorageRequest.cs index 85016995..363f6f62 100644 --- a/sdk/PowerBI.Api/Source/Models/AssignToDataflowStorageRequest.cs +++ b/sdk/PowerBI.Api/Source/Models/AssignToDataflowStorageRequest.cs @@ -28,10 +28,9 @@ public AssignToDataflowStorageRequest() /// class. /// /// The Power BI dataflow storage - /// account id. To unassign the specified workspace from a Power BI - /// dataflow storage account, an empty GUID - /// (00000000-0000-0000-0000-000000000000) should be provided as - /// dataflowStorageId. + /// account ID. To unassign the specified workspace from a Power BI + /// dataflow storage account, use an empty GUID + /// (`00000000-0000-0000-0000-000000000000`). public AssignToDataflowStorageRequest(System.Guid dataflowStorageId) { DataflowStorageId = dataflowStorageId; @@ -44,10 +43,9 @@ public AssignToDataflowStorageRequest(System.Guid dataflowStorageId) partial void CustomInit(); /// - /// Gets or sets the Power BI dataflow storage account id. To unassign + /// Gets or sets the Power BI dataflow storage account ID. To unassign /// the specified workspace from a Power BI dataflow storage account, - /// an empty GUID (00000000-0000-0000-0000-000000000000) should be - /// provided as dataflowStorageId. + /// use an empty GUID (`00000000-0000-0000-0000-000000000000`). /// [JsonProperty(PropertyName = "dataflowStorageId")] public System.Guid DataflowStorageId { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/AssignWorkspacesToCapacityRequest.cs b/sdk/PowerBI.Api/Source/Models/AssignWorkspacesToCapacityRequest.cs index 87155c7b..42c1c56f 100644 --- a/sdk/PowerBI.Api/Source/Models/AssignWorkspacesToCapacityRequest.cs +++ b/sdk/PowerBI.Api/Source/Models/AssignWorkspacesToCapacityRequest.cs @@ -6,7 +6,6 @@ namespace Microsoft.PowerBI.Api.Models { - using Microsoft.Rest; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -31,7 +30,7 @@ public AssignWorkspacesToCapacityRequest() /// Initializes a new instance of the AssignWorkspacesToCapacityRequest /// class. /// - public AssignWorkspacesToCapacityRequest(IList capacityMigrationAssignments) + public AssignWorkspacesToCapacityRequest(IList capacityMigrationAssignments = default(IList)) { CapacityMigrationAssignments = capacityMigrationAssignments; CustomInit(); @@ -47,28 +46,5 @@ public AssignWorkspacesToCapacityRequest(IList capa [JsonProperty(PropertyName = "capacityMigrationAssignments")] public IList CapacityMigrationAssignments { get; set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (CapacityMigrationAssignments == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "CapacityMigrationAssignments"); - } - if (CapacityMigrationAssignments != null) - { - foreach (var element in CapacityMigrationAssignments) - { - if (element != null) - { - element.Validate(); - } - } - } - } } } diff --git a/sdk/PowerBI.Api/Source/Models/BindToGatewayRequest.cs b/sdk/PowerBI.Api/Source/Models/BindToGatewayRequest.cs index 88d41798..e3c1b6e9 100644 --- a/sdk/PowerBI.Api/Source/Models/BindToGatewayRequest.cs +++ b/sdk/PowerBI.Api/Source/Models/BindToGatewayRequest.cs @@ -27,7 +27,10 @@ public BindToGatewayRequest() /// /// Initializes a new instance of the BindToGatewayRequest class. /// - /// The gateway id + /// The gateway ID. When using a gateway + /// cluster, the gateway ID refers to the primary (first) gateway in + /// the cluster. In such cases, gateway ID is similar to gateway + /// cluster ID. /// datasourceObjectIds belonging to /// the gateway public BindToGatewayRequest(System.Guid gatewayObjectId, IList datasourceObjectIds = default(IList)) @@ -43,7 +46,9 @@ public BindToGatewayRequest() partial void CustomInit(); /// - /// Gets or sets the gateway id + /// Gets or sets the gateway ID. When using a gateway cluster, the + /// gateway ID refers to the primary (first) gateway in the cluster. In + /// such cases, gateway ID is similar to gateway cluster ID. /// [JsonProperty(PropertyName = "gatewayObjectId")] public System.Guid GatewayObjectId { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/Capacity.cs b/sdk/PowerBI.Api/Source/Models/Capacity.cs index 7b840302..38369c6a 100644 --- a/sdk/PowerBI.Api/Source/Models/Capacity.cs +++ b/sdk/PowerBI.Api/Source/Models/Capacity.cs @@ -27,7 +27,7 @@ public Capacity() /// /// Initializes a new instance of the Capacity class. /// - /// The capacity id + /// The capacity ID /// The capacity state. Possible values include: /// 'NotActivated', 'Active', 'Provisioning', 'ProvisionFailed', /// 'Suspended', 'PreSuspended', 'Deleting', 'Deleted', 'Invalid', @@ -40,8 +40,8 @@ public Capacity() /// The capacity SKU. /// The Azure region where the capacity is /// provisioned - /// The id of the encryption key (Only - /// applicable for admin route) + /// The ID of an encryption key (only + /// applicable to the admin route) /// Encryption key information (Only applicable /// for admin route) public Capacity(System.Guid id, CapacityState state, CapacityUserAccessRight capacityUserAccessRight, string displayName = default(string), IList admins = default(IList), string sku = default(string), string region = default(string), System.Guid? tenantKeyId = default(System.Guid?), TenantKey tenantKey = default(TenantKey)) @@ -64,7 +64,7 @@ public Capacity() partial void CustomInit(); /// - /// Gets or sets the capacity id + /// Gets or sets the capacity ID /// [JsonProperty(PropertyName = "id")] public System.Guid Id { get; set; } @@ -110,7 +110,7 @@ public Capacity() public string Region { get; set; } /// - /// Gets or sets the id of the encryption key (Only applicable for + /// Gets or sets the ID of an encryption key (only applicable to the /// admin route) /// [JsonProperty(PropertyName = "tenantKeyId")] diff --git a/sdk/PowerBI.Api/Source/Models/CapacityMigrationAssignment.cs b/sdk/PowerBI.Api/Source/Models/CapacityMigrationAssignment.cs index 9ca6710a..4a4805fe 100644 --- a/sdk/PowerBI.Api/Source/Models/CapacityMigrationAssignment.cs +++ b/sdk/PowerBI.Api/Source/Models/CapacityMigrationAssignment.cs @@ -13,7 +13,7 @@ namespace Microsoft.PowerBI.Api.Models using System.Linq; /// - /// Assignment contract for migrating workspaces to shared capacity as + /// Assignment contract for migrating workspaces to premium capacity as /// tenant admin /// public partial class CapacityMigrationAssignment @@ -31,9 +31,10 @@ public CapacityMigrationAssignment() /// Initializes a new instance of the CapacityMigrationAssignment /// class. /// - /// Workspaces to be migrated to - /// shared capacity - /// Capacity id + /// The workspace IDs to be migrated + /// to premium capacity + /// The premium capacity + /// ID public CapacityMigrationAssignment(IList workspacesToAssign, string targetCapacityObjectId) { WorkspacesToAssign = workspacesToAssign; @@ -47,13 +48,13 @@ public CapacityMigrationAssignment(IList workspacesToAssign, string targ partial void CustomInit(); /// - /// Gets or sets workspaces to be migrated to shared capacity + /// Gets or sets the workspace IDs to be migrated to premium capacity /// [JsonProperty(PropertyName = "workspacesToAssign")] public IList WorkspacesToAssign { get; set; } /// - /// Gets or sets capacity id + /// Gets or sets the premium capacity ID /// [JsonProperty(PropertyName = "targetCapacityObjectId")] public string TargetCapacityObjectId { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/CapacityPatchRequest.cs b/sdk/PowerBI.Api/Source/Models/CapacityPatchRequest.cs index eb0809cd..2d1739a2 100644 --- a/sdk/PowerBI.Api/Source/Models/CapacityPatchRequest.cs +++ b/sdk/PowerBI.Api/Source/Models/CapacityPatchRequest.cs @@ -25,7 +25,7 @@ public CapacityPatchRequest() /// /// Initializes a new instance of the CapacityPatchRequest class. /// - /// The id of the encryption key + /// The ID of the encryption key public CapacityPatchRequest(System.Guid? tenantKeyId = default(System.Guid?)) { TenantKeyId = tenantKeyId; @@ -38,7 +38,7 @@ public CapacityPatchRequest() partial void CustomInit(); /// - /// Gets or sets the id of the encryption key + /// Gets or sets the ID of the encryption key /// [JsonProperty(PropertyName = "tenantKeyId")] public System.Guid? TenantKeyId { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/CapacityUser.cs b/sdk/PowerBI.Api/Source/Models/CapacityUser.cs new file mode 100644 index 00000000..8c0f57fe --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/CapacityUser.cs @@ -0,0 +1,103 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// A Power BI user access right entry for capacity + /// + public partial class CapacityUser + { + /// + /// Initializes a new instance of the CapacityUser class. + /// + public CapacityUser() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CapacityUser class. + /// + /// Access right user has on the + /// capacity. Possible values include: 'None', 'Assign', + /// 'Admin' + /// Email address of the user + /// Display name of the principal + /// Identifier of the principal + /// Identifier of the principal in Microsoft + /// Graph. Only available for admin APIs. + /// Possible values include: 'None', + /// 'User', 'Group', 'App' + public CapacityUser(CapacityUserAccessRight capacityUserAccessRight, string emailAddress = default(string), string displayName = default(string), string identifier = default(string), string graphId = default(string), PrincipalType? principalType = default(PrincipalType?)) + { + CapacityUserAccessRight = capacityUserAccessRight; + EmailAddress = emailAddress; + DisplayName = displayName; + Identifier = identifier; + GraphId = graphId; + PrincipalType = principalType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets access right user has on the capacity. Possible values + /// include: 'None', 'Assign', 'Admin' + /// + [JsonProperty(PropertyName = "capacityUserAccessRight")] + public CapacityUserAccessRight CapacityUserAccessRight { get; set; } + + /// + /// Gets or sets email address of the user + /// + [JsonProperty(PropertyName = "emailAddress")] + public string EmailAddress { get; set; } + + /// + /// Gets or sets display name of the principal + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets identifier of the principal + /// + [JsonProperty(PropertyName = "identifier")] + public string Identifier { get; set; } + + /// + /// Gets or sets identifier of the principal in Microsoft Graph. Only + /// available for admin APIs. + /// + [JsonProperty(PropertyName = "graphId")] + public string GraphId { get; set; } + + /// + /// Gets or sets possible values include: 'None', 'User', 'Group', + /// 'App' + /// + [JsonProperty(PropertyName = "principalType")] + public PrincipalType? PrincipalType { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/sdk/PowerBI.Api/Source/Models/CapacityUserAccessRight.cs b/sdk/PowerBI.Api/Source/Models/CapacityUserAccessRight.cs index a0bf8c37..bdb3421a 100644 --- a/sdk/PowerBI.Api/Source/Models/CapacityUserAccessRight.cs +++ b/sdk/PowerBI.Api/Source/Models/CapacityUserAccessRight.cs @@ -29,7 +29,8 @@ private CapacityUserAccessRight(string underlyingValue) public static readonly CapacityUserAccessRight None = "None"; /// - /// User can assign workspaces to the capacity + /// User has contributor rights and can assign workspaces to the + /// capacity /// public static readonly CapacityUserAccessRight Assign = "Assign"; diff --git a/sdk/PowerBI.Api/Source/Models/CapacityUsers.cs b/sdk/PowerBI.Api/Source/Models/CapacityUsers.cs new file mode 100644 index 00000000..08d48cea --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/CapacityUsers.cs @@ -0,0 +1,56 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Odata response wrapper for a Power BI user access right for capacity + /// List + /// + public partial class CapacityUsers + { + /// + /// Initializes a new instance of the CapacityUsers class. + /// + public CapacityUsers() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CapacityUsers class. + /// + /// The user access right for capacity List + public CapacityUsers(string odatacontext = default(string), IList value = default(IList)) + { + Odatacontext = odatacontext; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "odata.context")] + public string Odatacontext { get; set; } + + /// + /// Gets or sets the user access right for capacity List + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/ChangeLabelStatus.cs b/sdk/PowerBI.Api/Source/Models/ChangeLabelStatus.cs index c1f391fe..30d35cab 100644 --- a/sdk/PowerBI.Api/Source/Models/ChangeLabelStatus.cs +++ b/sdk/PowerBI.Api/Source/Models/ChangeLabelStatus.cs @@ -26,8 +26,9 @@ public ChangeLabelStatus() /// /// Initializes a new instance of the ChangeLabelStatus class. /// - /// Unique artifact Id, uuid format for - /// dashboard/report/dataflow, and string format for dataset. + /// The unique ID of an artifact, which is in UUID + /// format for dashboards, reports, and dataflows, and string format + /// for datasets /// Indicates the result of the label change /// operation. Possible values include: 'Failed', /// 'FailedToGetUsageRights', 'InsufficientUsageRights', 'NotFound', @@ -45,8 +46,9 @@ public ChangeLabelStatus(string id, Status status) partial void CustomInit(); /// - /// Gets or sets unique artifact Id, uuid format for - /// dashboard/report/dataflow, and string format for dataset. + /// Gets or sets the unique ID of an artifact, which is in UUID format + /// for dashboards, reports, and dataflows, and string format for + /// datasets /// [JsonProperty(PropertyName = "id")] public string Id { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/CloneReportRequest.cs b/sdk/PowerBI.Api/Source/Models/CloneReportRequest.cs index 9e0d06c2..5e8d27d7 100644 --- a/sdk/PowerBI.Api/Source/Models/CloneReportRequest.cs +++ b/sdk/PowerBI.Api/Source/Models/CloneReportRequest.cs @@ -28,12 +28,12 @@ public CloneReportRequest() /// /// The new report name /// Optional parameter for specifying - /// the target workspace id. Empty Guid + /// the target workspace ID. Empty Guid /// (00000000-0000-0000-0000-000000000000) indicates 'My Workspace'. /// <br/>If not provided, the new report will be cloned within /// the same workspace as the source report. /// Optional parameter for specifying the - /// target associated dataset id. <br/>If not provided, the new + /// target associated dataset ID. <br/>If not provided, the new /// report will be associated with the same dataset as the source /// report public CloneReportRequest(string name, System.Guid? targetWorkspaceId = default(System.Guid?), string targetModelId = default(string)) @@ -57,7 +57,7 @@ public CloneReportRequest() /// /// Gets or sets optional parameter for specifying the target workspace - /// id. Empty Guid (00000000-0000-0000-0000-000000000000) indicates 'My + /// ID. Empty Guid (00000000-0000-0000-0000-000000000000) indicates 'My /// Workspace'. &lt;br/&gt;If not provided, the new report will /// be cloned within the same workspace as the source report. /// @@ -66,7 +66,7 @@ public CloneReportRequest() /// /// Gets or sets optional parameter for specifying the target - /// associated dataset id. &lt;br/&gt;If not provided, the new + /// associated dataset ID. &lt;br/&gt;If not provided, the new /// report will be associated with the same dataset as the source /// report /// diff --git a/sdk/PowerBI.Api/Source/Models/CloneTileRequest.cs b/sdk/PowerBI.Api/Source/Models/CloneTileRequest.cs index 0ee20072..92889e8f 100644 --- a/sdk/PowerBI.Api/Source/Models/CloneTileRequest.cs +++ b/sdk/PowerBI.Api/Source/Models/CloneTileRequest.cs @@ -25,17 +25,17 @@ public CloneTileRequest() /// /// Initializes a new instance of the CloneTileRequest class. /// - /// The target dashboard id + /// The target dashboard ID /// Optional parameter for specifying - /// the target workspace id. Empty Guid + /// the target workspace ID. Empty Guid /// (00000000-0000-0000-0000-000000000000) indicates 'My Workspace'. /// <br/>If not provided, tile will be cloned within the same /// workspace as the source tile. /// Optional parameter <br/>When - /// cloning a tile linked to a report, pass the target report id to + /// cloning a tile linked to a report, pass the target report ID to /// rebind the new tile to a different report. /// Optional parameter <br/>When - /// cloning a tile linked to a dataset, pass the target model id to + /// cloning a tile linked to a dataset, pass the target model ID to /// rebind the new tile to a different dataset. /// Optional parameter for /// specifying the action in case of position conflict. <br/>If @@ -58,14 +58,14 @@ public CloneTileRequest() partial void CustomInit(); /// - /// Gets or sets the target dashboard id + /// Gets or sets the target dashboard ID /// [JsonProperty(PropertyName = "targetDashboardId")] public System.Guid TargetDashboardId { get; set; } /// /// Gets or sets optional parameter for specifying the target workspace - /// id. Empty Guid (00000000-0000-0000-0000-000000000000) indicates 'My + /// ID. Empty Guid (00000000-0000-0000-0000-000000000000) indicates 'My /// Workspace'. &lt;br/&gt;If not provided, tile will be cloned /// within the same workspace as the source tile. /// @@ -74,7 +74,7 @@ public CloneTileRequest() /// /// Gets or sets optional parameter &lt;br/&gt;When cloning a - /// tile linked to a report, pass the target report id to rebind the + /// tile linked to a report, pass the target report ID to rebind the /// new tile to a different report. /// [JsonProperty(PropertyName = "targetReportId")] @@ -82,7 +82,7 @@ public CloneTileRequest() /// /// Gets or sets optional parameter &lt;br/&gt;When cloning a - /// tile linked to a dataset, pass the target model id to rebind the + /// tile linked to a dataset, pass the target model ID to rebind the /// new tile to a different dataset. /// [JsonProperty(PropertyName = "targetModelId")] diff --git a/sdk/PowerBI.Api/Source/Models/Dashboard.cs b/sdk/PowerBI.Api/Source/Models/Dashboard.cs index f8398b9e..7b8a145b 100644 --- a/sdk/PowerBI.Api/Source/Models/Dashboard.cs +++ b/sdk/PowerBI.Api/Source/Models/Dashboard.cs @@ -30,7 +30,7 @@ public Dashboard() /// /// Initializes a new instance of the Dashboard class. /// - /// The dashboard id + /// The dashboard ID /// The dashboard display name /// Is ReadOnly dashboard /// The dashboard embed url @@ -39,7 +39,12 @@ public Dashboard() /// dashboard /// The dashboard sensitivity /// label - public Dashboard(System.Guid id, string displayName = default(string), bool? isReadOnly = default(bool?), string embedUrl = default(string), IList tiles = default(IList), string dataClassification = default(string), SensitivityLabel sensitivityLabel = default(SensitivityLabel)) + /// The Dashboard User Access Details. This value + /// will be empty. It will be removed from the payload response in an + /// upcoming release. To retrieve user information on an artifact, + /// please consider using the Get Dashboard User as Admin APIs, or the + /// PostWorkspaceInfo API with the getArtifactUser parameter. + public Dashboard(System.Guid id, string displayName = default(string), bool? isReadOnly = default(bool?), string embedUrl = default(string), IList tiles = default(IList), string dataClassification = default(string), SensitivityLabel sensitivityLabel = default(SensitivityLabel), IList users = default(IList)) { Id = id; DisplayName = displayName; @@ -48,6 +53,7 @@ public Dashboard() Tiles = tiles; DataClassification = dataClassification; SensitivityLabel = sensitivityLabel; + Users = users; CustomInit(); } @@ -57,7 +63,7 @@ public Dashboard() partial void CustomInit(); /// - /// Gets or sets the dashboard id + /// Gets or sets the dashboard ID /// [JsonProperty(PropertyName = "id")] public System.Guid Id { get; set; } @@ -98,6 +104,16 @@ public Dashboard() [JsonProperty(PropertyName = "sensitivityLabel")] public SensitivityLabel SensitivityLabel { get; set; } + /// + /// Gets or sets the Dashboard User Access Details. This value will be + /// empty. It will be removed from the payload response in an upcoming + /// release. To retrieve user information on an artifact, please + /// consider using the Get Dashboard User as Admin APIs, or the + /// PostWorkspaceInfo API with the getArtifactUser parameter. + /// + [JsonProperty(PropertyName = "users")] + public IList Users { get; set; } + /// /// Validate the object. /// @@ -120,6 +136,16 @@ public virtual void Validate() { SensitivityLabel.Validate(); } + if (Users != null) + { + foreach (var element1 in Users) + { + if (element1 != null) + { + element1.Validate(); + } + } + } } } } diff --git a/sdk/PowerBI.Api/Source/Models/DashboardUser.cs b/sdk/PowerBI.Api/Source/Models/DashboardUser.cs new file mode 100644 index 00000000..22632f3c --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DashboardUser.cs @@ -0,0 +1,104 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// A Power BI user access right entry for dashboard + /// + public partial class DashboardUser + { + /// + /// Initializes a new instance of the DashboardUser class. + /// + public DashboardUser() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DashboardUser class. + /// + /// Access rights user has for + /// the dashboard (Permission level). Possible values include: 'None', + /// 'Read', 'ReadWrite', 'ReadReshare', 'Owner' + /// Email address of the user + /// Display name of the principal + /// Identifier of the principal + /// Identifier of the principal in Microsoft + /// Graph. Only available for admin APIs. + /// Possible values include: 'None', + /// 'User', 'Group', 'App' + public DashboardUser(DashboardUserAccessRight dashboardUserAccessRight, string emailAddress = default(string), string displayName = default(string), string identifier = default(string), string graphId = default(string), PrincipalType? principalType = default(PrincipalType?)) + { + DashboardUserAccessRight = dashboardUserAccessRight; + EmailAddress = emailAddress; + DisplayName = displayName; + Identifier = identifier; + GraphId = graphId; + PrincipalType = principalType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets access rights user has for the dashboard (Permission + /// level). Possible values include: 'None', 'Read', 'ReadWrite', + /// 'ReadReshare', 'Owner' + /// + [JsonProperty(PropertyName = "dashboardUserAccessRight")] + public DashboardUserAccessRight DashboardUserAccessRight { get; set; } + + /// + /// Gets or sets email address of the user + /// + [JsonProperty(PropertyName = "emailAddress")] + public string EmailAddress { get; set; } + + /// + /// Gets or sets display name of the principal + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets identifier of the principal + /// + [JsonProperty(PropertyName = "identifier")] + public string Identifier { get; set; } + + /// + /// Gets or sets identifier of the principal in Microsoft Graph. Only + /// available for admin APIs. + /// + [JsonProperty(PropertyName = "graphId")] + public string GraphId { get; set; } + + /// + /// Gets or sets possible values include: 'None', 'User', 'Group', + /// 'App' + /// + [JsonProperty(PropertyName = "principalType")] + public PrincipalType? PrincipalType { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DashboardUserAccessRight.cs b/sdk/PowerBI.Api/Source/Models/DashboardUserAccessRight.cs new file mode 100644 index 00000000..a789edd5 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DashboardUserAccessRight.cs @@ -0,0 +1,122 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + + /// + /// Defines values for DashboardUserAccessRight. + /// + /// + /// Determine base value for a given allowed value if exists, else return + /// the value itself + /// + [JsonConverter(typeof(DashboardUserAccessRightConverter))] + public struct DashboardUserAccessRight : System.IEquatable + { + private DashboardUserAccessRight(string underlyingValue) + { + UnderlyingValue=underlyingValue; + } + + /// + /// No permission to content in dashboard + /// + public static readonly DashboardUserAccessRight None = "None"; + + /// + /// Grants Read access to content in dashboard + /// + public static readonly DashboardUserAccessRight Read = "Read"; + + /// + /// Grants Read and Write access to content in dashboard + /// + public static readonly DashboardUserAccessRight ReadWrite = "ReadWrite"; + + /// + /// Grants Read and Reshare access to content in dashboard + /// + public static readonly DashboardUserAccessRight ReadReshare = "ReadReshare"; + + /// + /// Grants Read, Write and Reshare access to content in report + /// + public static readonly DashboardUserAccessRight Owner = "Owner"; + + + /// + /// Underlying value of enum DashboardUserAccessRight + /// + private readonly string UnderlyingValue; + + /// + /// Returns string representation for DashboardUserAccessRight + /// + public override string ToString() + { + return UnderlyingValue.ToString(); + } + + /// + /// Compares enums of type DashboardUserAccessRight + /// + public bool Equals(DashboardUserAccessRight e) + { + return UnderlyingValue.Equals(e.UnderlyingValue); + } + + /// + /// Implicit operator to convert string to DashboardUserAccessRight + /// + public static implicit operator DashboardUserAccessRight(string value) + { + return new DashboardUserAccessRight(value); + } + + /// + /// Implicit operator to convert DashboardUserAccessRight to string + /// + public static implicit operator string(DashboardUserAccessRight e) + { + return e.UnderlyingValue; + } + + /// + /// Overriding == operator for enum DashboardUserAccessRight + /// + public static bool operator == (DashboardUserAccessRight e1, DashboardUserAccessRight e2) + { + return e2.Equals(e1); + } + + /// + /// Overriding != operator for enum DashboardUserAccessRight + /// + public static bool operator != (DashboardUserAccessRight e1, DashboardUserAccessRight e2) + { + return !e2.Equals(e1); + } + + /// + /// Overrides Equals operator for DashboardUserAccessRight + /// + public override bool Equals(object obj) + { + return obj is DashboardUserAccessRight && Equals((DashboardUserAccessRight)obj); + } + + /// + /// Returns for hashCode DashboardUserAccessRight + /// + public override int GetHashCode() + { + return UnderlyingValue.GetHashCode(); + } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DashboardUserAccessRightConverter.cs b/sdk/PowerBI.Api/Source/Models/DashboardUserAccessRightConverter.cs new file mode 100644 index 00000000..e9588d08 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DashboardUserAccessRightConverter.cs @@ -0,0 +1,50 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + + using System.Reflection; + + /// + /// Defines values for DashboardUserAccessRight. + /// + public sealed class DashboardUserAccessRightConverter : JsonConverter + { + + /// + /// Returns if objectType can be converted to DashboardUserAccessRight + /// by the converter. + /// + public override bool CanConvert(System.Type objectType) + { + return typeof(DashboardUserAccessRight).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); + } + + /// + /// Overrides ReadJson and converts token to DashboardUserAccessRight. + /// + public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) + { + if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) + { + return null; + } + return (DashboardUserAccessRight)serializer.Deserialize(reader); + } + + /// + /// Overriding WriteJson for DashboardUserAccessRight for + /// serialization. + /// + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteValue(value.ToString()); + } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DashboardUsers.cs b/sdk/PowerBI.Api/Source/Models/DashboardUsers.cs new file mode 100644 index 00000000..77239985 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DashboardUsers.cs @@ -0,0 +1,57 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Odata response wrapper for a Power BI user access right for dashboard + /// List + /// + public partial class DashboardUsers + { + /// + /// Initializes a new instance of the DashboardUsers class. + /// + public DashboardUsers() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DashboardUsers class. + /// + /// The user access right for dashboard + /// List + public DashboardUsers(string odatacontext = default(string), IList value = default(IList)) + { + Odatacontext = odatacontext; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "odata.context")] + public string Odatacontext { get; set; } + + /// + /// Gets or sets the user access right for dashboard List + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/Dataflow.cs b/sdk/PowerBI.Api/Source/Models/Dataflow.cs index ccc464fd..c159a9b3 100644 --- a/sdk/PowerBI.Api/Source/Models/Dataflow.cs +++ b/sdk/PowerBI.Api/Source/Models/Dataflow.cs @@ -30,7 +30,7 @@ public Dataflow() /// /// Initializes a new instance of the Dataflow class. /// - /// The dataflow id + /// The dataflow ID /// The dataflow name /// The dataflow description /// A URL to the dataflow definition file @@ -45,7 +45,12 @@ public Dataflow() /// Upstream Dataflows /// The dataflow sensitivity /// label - public Dataflow(System.Guid objectId, string name = default(string), string description = default(string), string modelUrl = default(string), string configuredBy = default(string), string modifiedBy = default(string), EndorsementDetails endorsementDetails = default(EndorsementDetails), System.DateTime? modifiedDateTime = default(System.DateTime?), IList datasourceUsages = default(IList), IList upstreamDataflows = default(IList), SensitivityLabel sensitivityLabel = default(SensitivityLabel)) + /// The Dataflow User Access Details. This value + /// will be empty. It will be removed from the payload response in an + /// upcoming release. To retrieve user information on an artifact, + /// please consider using the Get Dataflow User as Admin APIs, or the + /// PostWorkspaceInfo API with the getArtifactUser parameter. + public Dataflow(System.Guid objectId, string name = default(string), string description = default(string), string modelUrl = default(string), string configuredBy = default(string), string modifiedBy = default(string), EndorsementDetails endorsementDetails = default(EndorsementDetails), System.DateTime? modifiedDateTime = default(System.DateTime?), IList datasourceUsages = default(IList), IList upstreamDataflows = default(IList), SensitivityLabel sensitivityLabel = default(SensitivityLabel), IList users = default(IList)) { ObjectId = objectId; Name = name; @@ -58,6 +63,7 @@ public Dataflow() DatasourceUsages = datasourceUsages; UpstreamDataflows = upstreamDataflows; SensitivityLabel = sensitivityLabel; + Users = users; CustomInit(); } @@ -67,7 +73,7 @@ public Dataflow() partial void CustomInit(); /// - /// Gets or sets the dataflow id + /// Gets or sets the dataflow ID /// [JsonProperty(PropertyName = "objectId")] public System.Guid ObjectId { get; set; } @@ -132,6 +138,16 @@ public Dataflow() [JsonProperty(PropertyName = "sensitivityLabel")] public SensitivityLabel SensitivityLabel { get; set; } + /// + /// Gets or sets the Dataflow User Access Details. This value will be + /// empty. It will be removed from the payload response in an upcoming + /// release. To retrieve user information on an artifact, please + /// consider using the Get Dataflow User as Admin APIs, or the + /// PostWorkspaceInfo API with the getArtifactUser parameter. + /// + [JsonProperty(PropertyName = "users")] + public IList Users { get; set; } + /// /// Validate the object. /// diff --git a/sdk/PowerBI.Api/Source/Models/DataflowStorageAccount.cs b/sdk/PowerBI.Api/Source/Models/DataflowStorageAccount.cs index 1fe6e4b0..f0253cc5 100644 --- a/sdk/PowerBI.Api/Source/Models/DataflowStorageAccount.cs +++ b/sdk/PowerBI.Api/Source/Models/DataflowStorageAccount.cs @@ -25,7 +25,7 @@ public DataflowStorageAccount() /// /// Initializes a new instance of the DataflowStorageAccount class. /// - /// The Power BI dataflow storage account id + /// The Power BI dataflow storage account ID /// Indicates if workspaces can be assigned to /// this storage account /// The Power BI dataflow storage account @@ -44,7 +44,7 @@ public DataflowStorageAccount() partial void CustomInit(); /// - /// Gets or sets the Power BI dataflow storage account id + /// Gets or sets the Power BI dataflow storage account ID /// [JsonProperty(PropertyName = "id")] public System.Guid Id { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/DataflowTransaction.cs b/sdk/PowerBI.Api/Source/Models/DataflowTransaction.cs index 990f9eee..6a03b475 100644 --- a/sdk/PowerBI.Api/Source/Models/DataflowTransaction.cs +++ b/sdk/PowerBI.Api/Source/Models/DataflowTransaction.cs @@ -26,7 +26,7 @@ public DataflowTransaction() /// /// Initializes a new instance of the DataflowTransaction class. /// - /// The transaction id + /// The transaction ID /// The type of refresh transaction /// Start time of the transaction /// End time of the transaction @@ -47,7 +47,7 @@ public DataflowTransaction() partial void CustomInit(); /// - /// Gets or sets the transaction id + /// Gets or sets the transaction ID /// [JsonProperty(PropertyName = "id")] public string Id { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/DataflowTransactionStatus.cs b/sdk/PowerBI.Api/Source/Models/DataflowTransactionStatus.cs index 12507b83..62b2b8fe 100644 --- a/sdk/PowerBI.Api/Source/Models/DataflowTransactionStatus.cs +++ b/sdk/PowerBI.Api/Source/Models/DataflowTransactionStatus.cs @@ -25,7 +25,7 @@ public DataflowTransactionStatus() /// /// Initializes a new instance of the DataflowTransactionStatus class. /// - /// Transaction id + /// The transaction ID /// Status of transaction. Possible values /// include: 'invalid', 'successfullyMarked', 'alreadyConcluded', /// 'notFound' @@ -42,7 +42,7 @@ public DataflowTransactionStatus() partial void CustomInit(); /// - /// Gets or sets transaction id + /// Gets or sets the transaction ID /// [JsonProperty(PropertyName = "transactionId")] public string TransactionId { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/DataflowUser.cs b/sdk/PowerBI.Api/Source/Models/DataflowUser.cs new file mode 100644 index 00000000..5fccde17 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DataflowUser.cs @@ -0,0 +1,95 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// A Power BI user access right entry for dataflow + /// + public partial class DataflowUser + { + /// + /// Initializes a new instance of the DataflowUser class. + /// + public DataflowUser() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataflowUser class. + /// + /// Access rights user has for + /// the dataflow (Permission level). Possible values include: 'None', + /// 'Read', 'ReadWrite', 'ReadReshare', 'Owner' + /// Email address of the user + /// Display name of the principal + /// Identifier of the principal + /// Identifier of the principal in Microsoft + /// Graph. Only available for admin APIs. + /// Possible values include: 'None', + /// 'User', 'Group', 'App' + public DataflowUser(DataflowUserAccessRight? dataflowUserAccessRight = default(DataflowUserAccessRight?), string emailAddress = default(string), string displayName = default(string), string identifier = default(string), string graphId = default(string), PrincipalType? principalType = default(PrincipalType?)) + { + DataflowUserAccessRight = dataflowUserAccessRight; + EmailAddress = emailAddress; + DisplayName = displayName; + Identifier = identifier; + GraphId = graphId; + PrincipalType = principalType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets access rights user has for the dataflow (Permission + /// level). Possible values include: 'None', 'Read', 'ReadWrite', + /// 'ReadReshare', 'Owner' + /// + [JsonProperty(PropertyName = "DataflowUserAccessRight")] + public DataflowUserAccessRight? DataflowUserAccessRight { get; set; } + + /// + /// Gets or sets email address of the user + /// + [JsonProperty(PropertyName = "emailAddress")] + public string EmailAddress { get; set; } + + /// + /// Gets or sets display name of the principal + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets identifier of the principal + /// + [JsonProperty(PropertyName = "identifier")] + public string Identifier { get; set; } + + /// + /// Gets or sets identifier of the principal in Microsoft Graph. Only + /// available for admin APIs. + /// + [JsonProperty(PropertyName = "graphId")] + public string GraphId { get; set; } + + /// + /// Gets or sets possible values include: 'None', 'User', 'Group', + /// 'App' + /// + [JsonProperty(PropertyName = "principalType")] + public PrincipalType? PrincipalType { get; set; } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DataflowUserAccessRight.cs b/sdk/PowerBI.Api/Source/Models/DataflowUserAccessRight.cs new file mode 100644 index 00000000..12666b2a --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DataflowUserAccessRight.cs @@ -0,0 +1,122 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + + /// + /// Defines values for DataflowUserAccessRight. + /// + /// + /// Determine base value for a given allowed value if exists, else return + /// the value itself + /// + [JsonConverter(typeof(DataflowUserAccessRightConverter))] + public struct DataflowUserAccessRight : System.IEquatable + { + private DataflowUserAccessRight(string underlyingValue) + { + UnderlyingValue=underlyingValue; + } + + /// + /// Removes permission to content in dataflow + /// + public static readonly DataflowUserAccessRight None = "None"; + + /// + /// Grants Read access to content in dataflow + /// + public static readonly DataflowUserAccessRight Read = "Read"; + + /// + /// Grants Read and Write access to content in dataflow + /// + public static readonly DataflowUserAccessRight ReadWrite = "ReadWrite"; + + /// + /// Grants Read and Reshare access to content in dataflow + /// + public static readonly DataflowUserAccessRight ReadReshare = "ReadReshare"; + + /// + /// Grants Read, Write and Reshare access to content in dataflow + /// + public static readonly DataflowUserAccessRight Owner = "Owner"; + + + /// + /// Underlying value of enum DataflowUserAccessRight + /// + private readonly string UnderlyingValue; + + /// + /// Returns string representation for DataflowUserAccessRight + /// + public override string ToString() + { + return UnderlyingValue.ToString(); + } + + /// + /// Compares enums of type DataflowUserAccessRight + /// + public bool Equals(DataflowUserAccessRight e) + { + return UnderlyingValue.Equals(e.UnderlyingValue); + } + + /// + /// Implicit operator to convert string to DataflowUserAccessRight + /// + public static implicit operator DataflowUserAccessRight(string value) + { + return new DataflowUserAccessRight(value); + } + + /// + /// Implicit operator to convert DataflowUserAccessRight to string + /// + public static implicit operator string(DataflowUserAccessRight e) + { + return e.UnderlyingValue; + } + + /// + /// Overriding == operator for enum DataflowUserAccessRight + /// + public static bool operator == (DataflowUserAccessRight e1, DataflowUserAccessRight e2) + { + return e2.Equals(e1); + } + + /// + /// Overriding != operator for enum DataflowUserAccessRight + /// + public static bool operator != (DataflowUserAccessRight e1, DataflowUserAccessRight e2) + { + return !e2.Equals(e1); + } + + /// + /// Overrides Equals operator for DataflowUserAccessRight + /// + public override bool Equals(object obj) + { + return obj is DataflowUserAccessRight && Equals((DataflowUserAccessRight)obj); + } + + /// + /// Returns for hashCode DataflowUserAccessRight + /// + public override int GetHashCode() + { + return UnderlyingValue.GetHashCode(); + } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DataflowUserAccessRightConverter.cs b/sdk/PowerBI.Api/Source/Models/DataflowUserAccessRightConverter.cs new file mode 100644 index 00000000..bca5b817 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DataflowUserAccessRightConverter.cs @@ -0,0 +1,49 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + + using System.Reflection; + + /// + /// Defines values for DataflowUserAccessRight. + /// + public sealed class DataflowUserAccessRightConverter : JsonConverter + { + + /// + /// Returns if objectType can be converted to DataflowUserAccessRight + /// by the converter. + /// + public override bool CanConvert(System.Type objectType) + { + return typeof(DataflowUserAccessRight).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); + } + + /// + /// Overrides ReadJson and converts token to DataflowUserAccessRight. + /// + public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) + { + if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) + { + return null; + } + return (DataflowUserAccessRight)serializer.Deserialize(reader); + } + + /// + /// Overriding WriteJson for DataflowUserAccessRight for serialization. + /// + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteValue(value.ToString()); + } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DataflowUsers.cs b/sdk/PowerBI.Api/Source/Models/DataflowUsers.cs new file mode 100644 index 00000000..fe74eb52 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DataflowUsers.cs @@ -0,0 +1,56 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Odata response wrapper for a Power BI user access right for dataflow + /// List + /// + public partial class DataflowUsers + { + /// + /// Initializes a new instance of the DataflowUsers class. + /// + public DataflowUsers() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataflowUsers class. + /// + /// The user access right for dataflow List + public DataflowUsers(string odatacontext = default(string), IList value = default(IList)) + { + Odatacontext = odatacontext; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "odata.context")] + public string Odatacontext { get; set; } + + /// + /// Gets or sets the user access right for dataflow List + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/Dataset.cs b/sdk/PowerBI.Api/Source/Models/Dataset.cs index 092e1c62..b1938ed8 100644 --- a/sdk/PowerBI.Api/Source/Models/Dataset.cs +++ b/sdk/PowerBI.Api/Source/Models/Dataset.cs @@ -31,7 +31,7 @@ public Dataset() /// /// Initializes a new instance of the Dataset class. /// - /// The dataset id + /// The dataset ID /// The dataset name /// The dataset owner /// Whether the dataset allows adding @@ -60,9 +60,19 @@ public Dataset() /// details /// Datasource usages /// Upstream Dataflows + /// The dataset tables /// The dataset sensitivity /// label - public Dataset(string id, string name = default(string), string configuredBy = default(string), bool? addRowsAPIEnabled = default(bool?), string webUrl = default(string), bool? isRefreshable = default(bool?), bool? isEffectiveIdentityRequired = default(bool?), bool? isEffectiveIdentityRolesRequired = default(bool?), bool? isOnPremGatewayRequired = default(bool?), Encryption encryption = default(Encryption), System.DateTime? createdDate = default(System.DateTime?), string contentProviderType = default(string), string createReportEmbedURL = default(string), string qnaEmbedURL = default(string), string description = default(string), EndorsementDetails endorsementDetails = default(EndorsementDetails), IList datasourceUsages = default(IList), IList upstreamDataflows = default(IList), SensitivityLabel sensitivityLabel = default(SensitivityLabel)) + /// The Dataset User Access Details. This value + /// will be empty. It will be removed from the payload response in an + /// upcoming release. To retrieve user information on an artifact, + /// please consider using the Get Dataset User as Admin APIs, or the + /// PostWorkspaceInfo API with the getArtifactUser parameter. + /// The dataset schema retrieval + /// error + /// Whether dataset schema may not + /// be up to date + public Dataset(string id, string name = default(string), string configuredBy = default(string), bool? addRowsAPIEnabled = default(bool?), string webUrl = default(string), bool? isRefreshable = default(bool?), bool? isEffectiveIdentityRequired = default(bool?), bool? isEffectiveIdentityRolesRequired = default(bool?), bool? isOnPremGatewayRequired = default(bool?), Encryption encryption = default(Encryption), System.DateTime? createdDate = default(System.DateTime?), string contentProviderType = default(string), string createReportEmbedURL = default(string), string qnaEmbedURL = default(string), string description = default(string), EndorsementDetails endorsementDetails = default(EndorsementDetails), IList datasourceUsages = default(IList), IList upstreamDataflows = default(IList), IList tables = default(IList
), SensitivityLabel sensitivityLabel = default(SensitivityLabel), IList users = default(IList), string schemaRetrievalError = default(string), bool? schemaMayNotBeUpToDate = default(bool?)) { Id = id; Name = name; @@ -82,7 +92,11 @@ public Dataset() EndorsementDetails = endorsementDetails; DatasourceUsages = datasourceUsages; UpstreamDataflows = upstreamDataflows; + Tables = tables; SensitivityLabel = sensitivityLabel; + Users = users; + SchemaRetrievalError = schemaRetrievalError; + SchemaMayNotBeUpToDate = schemaMayNotBeUpToDate; CustomInit(); } @@ -92,7 +106,7 @@ public Dataset() partial void CustomInit(); /// - /// Gets or sets the dataset id + /// Gets or sets the dataset ID /// [JsonProperty(PropertyName = "id")] public string Id { get; set; } @@ -203,12 +217,40 @@ public Dataset() [JsonProperty(PropertyName = "upstreamDataflows")] public IList UpstreamDataflows { get; set; } + /// + /// Gets or sets the dataset tables + /// + [JsonProperty(PropertyName = "tables")] + public IList
Tables { get; set; } + /// /// Gets or sets the dataset sensitivity label /// [JsonProperty(PropertyName = "sensitivityLabel")] public SensitivityLabel SensitivityLabel { get; set; } + /// + /// Gets or sets the Dataset User Access Details. This value will be + /// empty. It will be removed from the payload response in an upcoming + /// release. To retrieve user information on an artifact, please + /// consider using the Get Dataset User as Admin APIs, or the + /// PostWorkspaceInfo API with the getArtifactUser parameter. + /// + [JsonProperty(PropertyName = "users")] + public IList Users { get; set; } + + /// + /// Gets or sets the dataset schema retrieval error + /// + [JsonProperty(PropertyName = "schemaRetrievalError")] + public string SchemaRetrievalError { get; set; } + + /// + /// Gets or sets whether dataset schema may not be up to date + /// + [JsonProperty(PropertyName = "schemaMayNotBeUpToDate")] + public bool? SchemaMayNotBeUpToDate { get; set; } + /// /// Validate the object. /// @@ -231,10 +273,30 @@ public virtual void Validate() } } } + if (Tables != null) + { + foreach (var element1 in Tables) + { + if (element1 != null) + { + element1.Validate(); + } + } + } if (SensitivityLabel != null) { SensitivityLabel.Validate(); } + if (Users != null) + { + foreach (var element2 in Users) + { + if (element2 != null) + { + element2.Validate(); + } + } + } } } } diff --git a/sdk/PowerBI.Api/Source/Models/DatasetExecuteQueriesQuery.cs b/sdk/PowerBI.Api/Source/Models/DatasetExecuteQueriesQuery.cs new file mode 100644 index 00000000..867f4302 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DatasetExecuteQueriesQuery.cs @@ -0,0 +1,61 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A dataset query. + /// + public partial class DatasetExecuteQueriesQuery + { + /// + /// Initializes a new instance of the DatasetExecuteQueriesQuery class. + /// + public DatasetExecuteQueriesQuery() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatasetExecuteQueriesQuery class. + /// + /// The DAX query to be executed. + public DatasetExecuteQueriesQuery(string query) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the DAX query to be executed. + /// + [JsonProperty(PropertyName = "query")] + public string Query { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Query == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Query"); + } + } + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DatasetExecuteQueriesQueryResult.cs b/sdk/PowerBI.Api/Source/Models/DatasetExecuteQueriesQueryResult.cs new file mode 100644 index 00000000..f3485cb6 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DatasetExecuteQueriesQueryResult.cs @@ -0,0 +1,51 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Result of a single data set query. + /// + public partial class DatasetExecuteQueriesQueryResult + { + /// + /// Initializes a new instance of the DatasetExecuteQueriesQueryResult + /// class. + /// + public DatasetExecuteQueriesQueryResult() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatasetExecuteQueriesQueryResult + /// class. + /// + /// A list of tables data for a query. + public DatasetExecuteQueriesQueryResult(IList tables = default(IList)) + { + Tables = tables; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a list of tables data for a query. + /// + [JsonProperty(PropertyName = "tables")] + public IList Tables { get; set; } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DatasetExecuteQueriesRequest.cs b/sdk/PowerBI.Api/Source/Models/DatasetExecuteQueriesRequest.cs new file mode 100644 index 00000000..de91810d --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DatasetExecuteQueriesRequest.cs @@ -0,0 +1,84 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Request to execute queries against a dataset. + /// + public partial class DatasetExecuteQueriesRequest + { + /// + /// Initializes a new instance of the DatasetExecuteQueriesRequest + /// class. + /// + public DatasetExecuteQueriesRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatasetExecuteQueriesRequest + /// class. + /// + /// A list of queries to be executed. + /// The serialization settings for the + /// results. + public DatasetExecuteQueriesRequest(IList queries, DatasetExecuteQueriesSerializationSettings serializerSettings = default(DatasetExecuteQueriesSerializationSettings)) + { + Queries = queries; + SerializerSettings = serializerSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a list of queries to be executed. + /// + [JsonProperty(PropertyName = "queries")] + public IList Queries { get; set; } + + /// + /// Gets or sets the serialization settings for the results. + /// + [JsonProperty(PropertyName = "serializerSettings")] + public DatasetExecuteQueriesSerializationSettings SerializerSettings { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Queries == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Queries"); + } + if (Queries != null) + { + foreach (var element in Queries) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DatasetExecuteQueriesResponse.cs b/sdk/PowerBI.Api/Source/Models/DatasetExecuteQueriesResponse.cs new file mode 100644 index 00000000..9abd2f3f --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DatasetExecuteQueriesResponse.cs @@ -0,0 +1,52 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Response of a data set execute queries request. + /// + public partial class DatasetExecuteQueriesResponse + { + /// + /// Initializes a new instance of the DatasetExecuteQueriesResponse + /// class. + /// + public DatasetExecuteQueriesResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatasetExecuteQueriesResponse + /// class. + /// + /// A list of results, one per input + /// query. + public DatasetExecuteQueriesResponse(IList results = default(IList)) + { + Results = results; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a list of results, one per input query. + /// + [JsonProperty(PropertyName = "results")] + public IList Results { get; set; } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DatasetExecuteQueriesSerializationSettings.cs b/sdk/PowerBI.Api/Source/Models/DatasetExecuteQueriesSerializationSettings.cs new file mode 100644 index 00000000..6f6d2970 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DatasetExecuteQueriesSerializationSettings.cs @@ -0,0 +1,53 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The serialization settings for the dataset query results. + /// + public partial class DatasetExecuteQueriesSerializationSettings + { + /// + /// Initializes a new instance of the + /// DatasetExecuteQueriesSerializationSettings class. + /// + public DatasetExecuteQueriesSerializationSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// DatasetExecuteQueriesSerializationSettings class. + /// + /// 1 indicates that null (blank) values + /// should be included in the result. 0 indicates they should be + /// omitted. 0 is the default in absence of the settings. + public DatasetExecuteQueriesSerializationSettings(bool? includeNulls = default(bool?)) + { + IncludeNulls = includeNulls; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets 1 indicates that null (blank) values should be + /// included in the result. 0 indicates they should be omitted. 0 is + /// the default in absence of the settings. + /// + [JsonProperty(PropertyName = "includeNulls")] + public bool? IncludeNulls { get; set; } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DatasetExecuteQueriesTableResult.cs b/sdk/PowerBI.Api/Source/Models/DatasetExecuteQueriesTableResult.cs new file mode 100644 index 00000000..c27bebac --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DatasetExecuteQueriesTableResult.cs @@ -0,0 +1,51 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A table of data. + /// + public partial class DatasetExecuteQueriesTableResult + { + /// + /// Initializes a new instance of the DatasetExecuteQueriesTableResult + /// class. + /// + public DatasetExecuteQueriesTableResult() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatasetExecuteQueriesTableResult + /// class. + /// + /// A list of rows. + public DatasetExecuteQueriesTableResult(IList rows = default(IList)) + { + Rows = rows; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a list of rows. + /// + [JsonProperty(PropertyName = "rows")] + public IList Rows { get; set; } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DatasetToDataflowLinkResponse.cs b/sdk/PowerBI.Api/Source/Models/DatasetToDataflowLinkResponse.cs index 1d03e24d..b07fad5b 100644 --- a/sdk/PowerBI.Api/Source/Models/DatasetToDataflowLinkResponse.cs +++ b/sdk/PowerBI.Api/Source/Models/DatasetToDataflowLinkResponse.cs @@ -27,9 +27,9 @@ public DatasetToDataflowLinkResponse() /// Initializes a new instance of the DatasetToDataflowLinkResponse /// class. /// - /// The dataset object id - /// The dataflow object id - /// The workspace object id + /// The dataset object ID + /// The dataflow object ID + /// The workspace object ID public DatasetToDataflowLinkResponse(string datasetObjectId = default(string), string dataflowObjectId = default(string), string workspaceObjectId = default(string)) { DatasetObjectId = datasetObjectId; @@ -44,19 +44,19 @@ public DatasetToDataflowLinkResponse() partial void CustomInit(); /// - /// Gets or sets the dataset object id + /// Gets or sets the dataset object ID /// [JsonProperty(PropertyName = "datasetObjectId")] public string DatasetObjectId { get; set; } /// - /// Gets or sets the dataflow object id + /// Gets or sets the dataflow object ID /// [JsonProperty(PropertyName = "dataflowObjectId")] public string DataflowObjectId { get; set; } /// - /// Gets or sets the workspace object id + /// Gets or sets the workspace object ID /// [JsonProperty(PropertyName = "workspaceObjectId")] public string WorkspaceObjectId { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/DatasetUser.cs b/sdk/PowerBI.Api/Source/Models/DatasetUser.cs new file mode 100644 index 00000000..7148c946 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DatasetUser.cs @@ -0,0 +1,107 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// A Power BI user access right entry for dataset + /// + public partial class DatasetUser + { + /// + /// Initializes a new instance of the DatasetUser class. + /// + public DatasetUser() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatasetUser class. + /// + /// Access rights user has for the + /// dataset (Permission level). Possible values include: 'None', + /// 'Read', 'ReadWrite', 'ReadReshare', 'ReadWriteReshare', + /// 'ReadExplore', 'ReadReshareExplore', 'ReadWriteExplore', + /// 'ReadWriteReshareExplore' + /// Email address of the user + /// Display name of the principal + /// Identifier of the principal + /// Identifier of the principal in Microsoft + /// Graph. Only available for admin APIs. + /// Possible values include: 'None', + /// 'User', 'Group', 'App' + public DatasetUser(DatasetUserAccessRight datasetUserAccessRight, string emailAddress = default(string), string displayName = default(string), string identifier = default(string), string graphId = default(string), PrincipalType? principalType = default(PrincipalType?)) + { + DatasetUserAccessRight = datasetUserAccessRight; + EmailAddress = emailAddress; + DisplayName = displayName; + Identifier = identifier; + GraphId = graphId; + PrincipalType = principalType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets access rights user has for the dataset (Permission + /// level). Possible values include: 'None', 'Read', 'ReadWrite', + /// 'ReadReshare', 'ReadWriteReshare', 'ReadExplore', + /// 'ReadReshareExplore', 'ReadWriteExplore', 'ReadWriteReshareExplore' + /// + [JsonProperty(PropertyName = "datasetUserAccessRight")] + public DatasetUserAccessRight DatasetUserAccessRight { get; set; } + + /// + /// Gets or sets email address of the user + /// + [JsonProperty(PropertyName = "emailAddress")] + public string EmailAddress { get; set; } + + /// + /// Gets or sets display name of the principal + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets identifier of the principal + /// + [JsonProperty(PropertyName = "identifier")] + public string Identifier { get; set; } + + /// + /// Gets or sets identifier of the principal in Microsoft Graph. Only + /// available for admin APIs. + /// + [JsonProperty(PropertyName = "graphId")] + public string GraphId { get; set; } + + /// + /// Gets or sets possible values include: 'None', 'User', 'Group', + /// 'App' + /// + [JsonProperty(PropertyName = "principalType")] + public PrincipalType? PrincipalType { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DatasetUserAccessRight.cs b/sdk/PowerBI.Api/Source/Models/DatasetUserAccessRight.cs new file mode 100644 index 00000000..8f5a3b13 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DatasetUserAccessRight.cs @@ -0,0 +1,143 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + + /// + /// Defines values for DatasetUserAccessRight. + /// + /// + /// Determine base value for a given allowed value if exists, else return + /// the value itself + /// + [JsonConverter(typeof(DatasetUserAccessRightConverter))] + public struct DatasetUserAccessRight : System.IEquatable + { + private DatasetUserAccessRight(string underlyingValue) + { + UnderlyingValue=underlyingValue; + } + + /// + /// Removes permission to content in dataset + /// + public static readonly DatasetUserAccessRight None = "None"; + + /// + /// Grants Read access to content in dataset + /// + public static readonly DatasetUserAccessRight Read = "Read"; + + /// + /// Grants Read and Write access to content in dataset + /// + public static readonly DatasetUserAccessRight ReadWrite = "ReadWrite"; + + /// + /// Grants Read and Reshare access to content in dataset + /// + public static readonly DatasetUserAccessRight ReadReshare = "ReadReshare"; + + /// + /// Grants Read, Write and Reshare access to content in dataset + /// + public static readonly DatasetUserAccessRight ReadWriteReshare = "ReadWriteReshare"; + + /// + /// Grants Read and Explore access to content in dataset + /// + public static readonly DatasetUserAccessRight ReadExplore = "ReadExplore"; + + /// + /// Grants Read, Reshare and Explore access to content in dataset + /// + public static readonly DatasetUserAccessRight ReadReshareExplore = "ReadReshareExplore"; + + /// + /// Grants Read, Write and Explore access to content in dataset + /// + public static readonly DatasetUserAccessRight ReadWriteExplore = "ReadWriteExplore"; + + /// + /// Grants Read, Write, Reshare and Explore access to content in + /// dataset + /// + public static readonly DatasetUserAccessRight ReadWriteReshareExplore = "ReadWriteReshareExplore"; + + + /// + /// Underlying value of enum DatasetUserAccessRight + /// + private readonly string UnderlyingValue; + + /// + /// Returns string representation for DatasetUserAccessRight + /// + public override string ToString() + { + return UnderlyingValue.ToString(); + } + + /// + /// Compares enums of type DatasetUserAccessRight + /// + public bool Equals(DatasetUserAccessRight e) + { + return UnderlyingValue.Equals(e.UnderlyingValue); + } + + /// + /// Implicit operator to convert string to DatasetUserAccessRight + /// + public static implicit operator DatasetUserAccessRight(string value) + { + return new DatasetUserAccessRight(value); + } + + /// + /// Implicit operator to convert DatasetUserAccessRight to string + /// + public static implicit operator string(DatasetUserAccessRight e) + { + return e.UnderlyingValue; + } + + /// + /// Overriding == operator for enum DatasetUserAccessRight + /// + public static bool operator == (DatasetUserAccessRight e1, DatasetUserAccessRight e2) + { + return e2.Equals(e1); + } + + /// + /// Overriding != operator for enum DatasetUserAccessRight + /// + public static bool operator != (DatasetUserAccessRight e1, DatasetUserAccessRight e2) + { + return !e2.Equals(e1); + } + + /// + /// Overrides Equals operator for DatasetUserAccessRight + /// + public override bool Equals(object obj) + { + return obj is DatasetUserAccessRight && Equals((DatasetUserAccessRight)obj); + } + + /// + /// Returns for hashCode DatasetUserAccessRight + /// + public override int GetHashCode() + { + return UnderlyingValue.GetHashCode(); + } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DatasetUserAccessRightConverter.cs b/sdk/PowerBI.Api/Source/Models/DatasetUserAccessRightConverter.cs new file mode 100644 index 00000000..9ea76f60 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DatasetUserAccessRightConverter.cs @@ -0,0 +1,49 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + + using System.Reflection; + + /// + /// Defines values for DatasetUserAccessRight. + /// + public sealed class DatasetUserAccessRightConverter : JsonConverter + { + + /// + /// Returns if objectType can be converted to DatasetUserAccessRight by + /// the converter. + /// + public override bool CanConvert(System.Type objectType) + { + return typeof(DatasetUserAccessRight).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); + } + + /// + /// Overrides ReadJson and converts token to DatasetUserAccessRight. + /// + public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) + { + if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) + { + return null; + } + return (DatasetUserAccessRight)serializer.Deserialize(reader); + } + + /// + /// Overriding WriteJson for DatasetUserAccessRight for serialization. + /// + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteValue(value.ToString()); + } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DatasetUsers.cs b/sdk/PowerBI.Api/Source/Models/DatasetUsers.cs new file mode 100644 index 00000000..7d69ef64 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DatasetUsers.cs @@ -0,0 +1,56 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Odata response wrapper for a Power BI user access right for dataset + /// List + /// + public partial class DatasetUsers + { + /// + /// Initializes a new instance of the DatasetUsers class. + /// + public DatasetUsers() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatasetUsers class. + /// + /// The user access right for dataset List + public DatasetUsers(string odatacontext = default(string), IList value = default(IList)) + { + Odatacontext = odatacontext; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "odata.context")] + public string Odatacontext { get; set; } + + /// + /// Gets or sets the user access right for dataset List + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/Datasource.cs b/sdk/PowerBI.Api/Source/Models/Datasource.cs index 46a0bcb6..84a24960 100644 --- a/sdk/PowerBI.Api/Source/Models/Datasource.cs +++ b/sdk/PowerBI.Api/Source/Models/Datasource.cs @@ -32,10 +32,12 @@ public Datasource() /// The datasource type /// The datasource connection /// details - /// The bound gateway id. Empty when not bound - /// to a gateway. - /// The bound datasource id. Empty when not - /// bound to a gateway. + /// The bound gateway ID. Empty when not bound + /// to a gateway. When using a gateway cluster, the gateway ID refers + /// to the primary (first) gateway in the cluster. In such cases, + /// gateway ID is similar to gateway cluster ID. + /// The bound datasource ID, which is empty + /// when not bound to a gateway public Datasource(string name = default(string), string connectionString = default(string), string datasourceType = default(string), DatasourceConnectionDetails connectionDetails = default(DatasourceConnectionDetails), System.Guid? gatewayId = default(System.Guid?), System.Guid? datasourceId = default(System.Guid?)) { Name = name; @@ -79,15 +81,17 @@ public Datasource() public DatasourceConnectionDetails ConnectionDetails { get; set; } /// - /// Gets or sets the bound gateway id. Empty when not bound to a - /// gateway. + /// Gets or sets the bound gateway ID. Empty when not bound to a + /// gateway. When using a gateway cluster, the gateway ID refers to the + /// primary (first) gateway in the cluster. In such cases, gateway ID + /// is similar to gateway cluster ID. /// [JsonProperty(PropertyName = "gatewayId")] public System.Guid? GatewayId { get; set; } /// - /// Gets or sets the bound datasource id. Empty when not bound to a - /// gateway. + /// Gets or sets the bound datasource ID, which is empty when not bound + /// to a gateway /// [JsonProperty(PropertyName = "datasourceId")] public System.Guid? DatasourceId { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/DatasourceUser.cs b/sdk/PowerBI.Api/Source/Models/DatasourceUser.cs index d7a6aa31..6385f97a 100644 --- a/sdk/PowerBI.Api/Source/Models/DatasourceUser.cs +++ b/sdk/PowerBI.Api/Source/Models/DatasourceUser.cs @@ -33,8 +33,8 @@ public DatasourceUser() /// [Object /// ID](/power-bi/developer/embedded/embedded-troubleshoot#what-is-the-difference-between-application-object-id-and-principal-object-id) /// of the principal - /// The principal type. Possible values - /// include: 'User', 'Group', 'App' + /// Possible values include: 'None', + /// 'User', 'Group', 'App' public DatasourceUser(DatasourceUserAccessRight datasourceAccessRight, string emailAddress = default(string), string displayName = default(string), string identifier = default(string), PrincipalType? principalType = default(PrincipalType?)) { DatasourceAccessRight = datasourceAccessRight; @@ -78,8 +78,8 @@ public DatasourceUser() public string Identifier { get; set; } /// - /// Gets or sets the principal type. Possible values include: 'User', - /// 'Group', 'App' + /// Gets or sets possible values include: 'None', 'User', 'Group', + /// 'App' /// [JsonProperty(PropertyName = "principalType")] public PrincipalType? PrincipalType { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/DependentDataflow.cs b/sdk/PowerBI.Api/Source/Models/DependentDataflow.cs index ae874bf3..eabc6393 100644 --- a/sdk/PowerBI.Api/Source/Models/DependentDataflow.cs +++ b/sdk/PowerBI.Api/Source/Models/DependentDataflow.cs @@ -25,8 +25,8 @@ public DependentDataflow() /// /// Initializes a new instance of the DependentDataflow class. /// - /// The target dataflow id - /// The target group id + /// The target dataflow ID + /// The target group ID public DependentDataflow(string targetDataflowId = default(string), string groupId = default(string)) { TargetDataflowId = targetDataflowId; @@ -40,13 +40,13 @@ public DependentDataflow() partial void CustomInit(); /// - /// Gets or sets the target dataflow id + /// Gets or sets the target dataflow ID /// [JsonProperty(PropertyName = "targetDataflowId")] public string TargetDataflowId { get; set; } /// - /// Gets or sets the target group id + /// Gets or sets the target group ID /// [JsonProperty(PropertyName = "groupId")] public string GroupId { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/DeployAllRequest.cs b/sdk/PowerBI.Api/Source/Models/DeployAllRequest.cs new file mode 100644 index 00000000..c72a9b59 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DeployAllRequest.cs @@ -0,0 +1,61 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using System.Linq; + + /// + /// Request to deploy all supported items from a deployment pipeline stage + /// + public partial class DeployAllRequest : DeployRequestBase + { + /// + /// Initializes a new instance of the DeployAllRequest class. + /// + public DeployAllRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DeployAllRequest class. + /// + /// The order of the pipeline stages + /// that the content should be deployed from. + /// Whether the deployment should be + /// done into the previous stage, if not provided treated as + /// false. + /// Required for creating a new workspace + /// when deploying into a stage which has no assigned workspaces. If + /// not provided when required, deployment will fail. + /// Update org app in the target + /// workspace settings. + /// Options to control the behavior of the entire + /// deployment. + public DeployAllRequest(int sourceStageOrder, bool? isBackwardDeployment = default(bool?), PipelineNewWorkspaceRequest newWorkspace = default(PipelineNewWorkspaceRequest), PipelineUpdateAppSettings updateAppSettings = default(PipelineUpdateAppSettings), DeploymentOptions options = default(DeploymentOptions)) + : base(sourceStageOrder, isBackwardDeployment, newWorkspace, updateAppSettings, options) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DeployArtifactRequest.cs b/sdk/PowerBI.Api/Source/Models/DeployArtifactRequest.cs new file mode 100644 index 00000000..27bf5e60 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DeployArtifactRequest.cs @@ -0,0 +1,66 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The artifact to be deployed + /// + public partial class DeployArtifactRequest + { + /// + /// Initializes a new instance of the DeployArtifactRequest class. + /// + public DeployArtifactRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DeployArtifactRequest class. + /// + /// The artifact ID + /// Options to control the behavior of the + /// deployment of a specific artifact + public DeployArtifactRequest(System.Guid sourceId, DeploymentOptions options = default(DeploymentOptions)) + { + SourceId = sourceId; + Options = options; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the artifact ID + /// + [JsonProperty(PropertyName = "sourceId")] + public System.Guid SourceId { get; set; } + + /// + /// Gets or sets options to control the behavior of the deployment of a + /// specific artifact + /// + [JsonProperty(PropertyName = "options")] + public DeploymentOptions Options { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DeployRequestBase.cs b/sdk/PowerBI.Api/Source/Models/DeployRequestBase.cs new file mode 100644 index 00000000..4dc96b40 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DeployRequestBase.cs @@ -0,0 +1,100 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Base request to deploy content from a deployment pipeline stage. + /// + public partial class DeployRequestBase + { + /// + /// Initializes a new instance of the DeployRequestBase class. + /// + public DeployRequestBase() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DeployRequestBase class. + /// + /// The order of the pipeline stages + /// that the content should be deployed from. + /// Whether the deployment should be + /// done into the previous stage, if not provided treated as + /// false. + /// Required for creating a new workspace + /// when deploying into a stage which has no assigned workspaces. If + /// not provided when required, deployment will fail. + /// Update org app in the target + /// workspace settings. + /// Options to control the behavior of the entire + /// deployment. + public DeployRequestBase(int sourceStageOrder, bool? isBackwardDeployment = default(bool?), PipelineNewWorkspaceRequest newWorkspace = default(PipelineNewWorkspaceRequest), PipelineUpdateAppSettings updateAppSettings = default(PipelineUpdateAppSettings), DeploymentOptions options = default(DeploymentOptions)) + { + SourceStageOrder = sourceStageOrder; + IsBackwardDeployment = isBackwardDeployment; + NewWorkspace = newWorkspace; + UpdateAppSettings = updateAppSettings; + Options = options; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the order of the pipeline stages that the content + /// should be deployed from. + /// + [JsonProperty(PropertyName = "sourceStageOrder")] + public int SourceStageOrder { get; set; } + + /// + /// Gets or sets whether the deployment should be done into the + /// previous stage, if not provided treated as false. + /// + [JsonProperty(PropertyName = "isBackwardDeployment")] + public bool? IsBackwardDeployment { get; set; } + + /// + /// Gets or sets required for creating a new workspace when deploying + /// into a stage which has no assigned workspaces. If not provided when + /// required, deployment will fail. + /// + [JsonProperty(PropertyName = "newWorkspace")] + public PipelineNewWorkspaceRequest NewWorkspace { get; set; } + + /// + /// Gets or sets update org app in the target workspace settings. + /// + [JsonProperty(PropertyName = "updateAppSettings")] + public PipelineUpdateAppSettings UpdateAppSettings { get; set; } + + /// + /// Gets or sets options to control the behavior of the entire + /// deployment. + /// + [JsonProperty(PropertyName = "options")] + public DeploymentOptions Options { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DeploymentError.cs b/sdk/PowerBI.Api/Source/Models/DeploymentError.cs new file mode 100644 index 00000000..fda7bc2d --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DeploymentError.cs @@ -0,0 +1,55 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The deployment step error details + /// + public partial class DeploymentError + { + /// + /// Initializes a new instance of the DeploymentError class. + /// + public DeploymentError() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DeploymentError class. + /// + /// The error code + /// Additional error details + public DeploymentError(string errorCode = default(string), string errorDetails = default(string)) + { + ErrorCode = errorCode; + ErrorDetails = errorDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the error code + /// + [JsonProperty(PropertyName = "errorCode")] + public string ErrorCode { get; set; } + + /// + /// Gets or sets additional error details + /// + [JsonProperty(PropertyName = "errorDetails")] + public string ErrorDetails { get; set; } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DeploymentExecutionPlan.cs b/sdk/PowerBI.Api/Source/Models/DeploymentExecutionPlan.cs new file mode 100644 index 00000000..84169304 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DeploymentExecutionPlan.cs @@ -0,0 +1,49 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The deployment execution plan + /// + public partial class DeploymentExecutionPlan + { + /// + /// Initializes a new instance of the DeploymentExecutionPlan class. + /// + public DeploymentExecutionPlan() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DeploymentExecutionPlan class. + /// + /// The execution plan steps collection + public DeploymentExecutionPlan(IList steps = default(IList)) + { + Steps = steps; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the execution plan steps collection + /// + [JsonProperty(PropertyName = "steps")] + public IList Steps { get; set; } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DeploymentExecutionStep.cs b/sdk/PowerBI.Api/Source/Models/DeploymentExecutionStep.cs new file mode 100644 index 00000000..345bdef4 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DeploymentExecutionStep.cs @@ -0,0 +1,100 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The deployment execution step + /// + public partial class DeploymentExecutionStep + { + /// + /// Initializes a new instance of the DeploymentExecutionStep class. + /// + public DeploymentExecutionStep() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DeploymentExecutionStep class. + /// + /// The step index + /// The deployment step type. Possible values + /// include: 'DatasetDeployment', 'ReportDeployment', + /// 'DashboardDeployment', 'DataflowDeployment' + /// The status of the pipeline operation. Possible + /// values include: 'NotStarted', 'Executing', 'Succeeded', + /// 'Failed' + /// The source and target items of the + /// step + /// Error details of the step's failure + public DeploymentExecutionStep(int index, DeploymentStepType type, PipelineOperationStatus status, DeploymentSourceAndTarget sourceAndTarget = default(DeploymentSourceAndTarget), DeploymentError error = default(DeploymentError)) + { + Index = index; + Type = type; + Status = status; + SourceAndTarget = sourceAndTarget; + Error = error; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the step index + /// + [JsonProperty(PropertyName = "index")] + public int Index { get; set; } + + /// + /// Gets or sets the deployment step type. Possible values include: + /// 'DatasetDeployment', 'ReportDeployment', 'DashboardDeployment', + /// 'DataflowDeployment' + /// + [JsonProperty(PropertyName = "type")] + public DeploymentStepType Type { get; set; } + + /// + /// Gets or sets the status of the pipeline operation. Possible values + /// include: 'NotStarted', 'Executing', 'Succeeded', 'Failed' + /// + [JsonProperty(PropertyName = "status")] + public PipelineOperationStatus Status { get; set; } + + /// + /// Gets or sets the source and target items of the step + /// + [JsonProperty(PropertyName = "sourceAndTarget")] + public DeploymentSourceAndTarget SourceAndTarget { get; set; } + + /// + /// Gets or sets error details of the step's failure + /// + [JsonProperty(PropertyName = "error")] + public DeploymentError Error { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (SourceAndTarget != null) + { + SourceAndTarget.Validate(); + } + } + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DeploymentOptions.cs b/sdk/PowerBI.Api/Source/Models/DeploymentOptions.cs new file mode 100644 index 00000000..5d6ed4c6 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DeploymentOptions.cs @@ -0,0 +1,115 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Options to control the behaviour of the deployment. can be specified + /// either for the entire deployment or for a specific artifact. if both + /// are specified, the artifact value is used. + /// + public partial class DeploymentOptions + { + /// + /// Initializes a new instance of the DeploymentOptions class. + /// + public DeploymentOptions() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DeploymentOptions class. + /// + /// Specifies whether creating a new + /// artifact on the target stage workspace is allowed. If required but + /// not allowed, deployment will fail. + /// Specifies whether overwriting + /// an artifact on the target stage workspace is allowed. If required + /// but not allowed, deployment will fail. + /// Specifies + /// whether skipping tiles that are missing their model or report in + /// target stage workspace is allowed. If required but not allowed, + /// deployment will fail. + /// Specify whether deleting all data from + /// the target artifact is allowed in case of a schema mismatch. If + /// required but not allowed, deployment will fail. + /// Specify whether taking ownership of the + /// target artifact is allowed for paginated report. If required but + /// not allowed, deployment will fail. + /// Specify whether + /// changing the target artifact label is allowed. The label is changed + /// when the source is protected but the target is not. If required but + /// not allowed, deployment will fail. + public DeploymentOptions(bool? allowCreateArtifact = default(bool?), bool? allowOverwriteArtifact = default(bool?), bool? allowSkipTilesWithMissingPrerequisites = default(bool?), bool? allowPurgeData = default(bool?), bool? allowTakeOver = default(bool?), bool? allowOverwriteTargetArtifactLabel = default(bool?)) + { + AllowCreateArtifact = allowCreateArtifact; + AllowOverwriteArtifact = allowOverwriteArtifact; + AllowSkipTilesWithMissingPrerequisites = allowSkipTilesWithMissingPrerequisites; + AllowPurgeData = allowPurgeData; + AllowTakeOver = allowTakeOver; + AllowOverwriteTargetArtifactLabel = allowOverwriteTargetArtifactLabel; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets Specifies whether creating a new artifact on the + /// target stage workspace is allowed. If required but not allowed, + /// deployment will fail. + /// + [JsonProperty(PropertyName = "allowCreateArtifact")] + public bool? AllowCreateArtifact { get; set; } + + /// + /// Gets or sets specifies whether overwriting an artifact on the + /// target stage workspace is allowed. If required but not allowed, + /// deployment will fail. + /// + [JsonProperty(PropertyName = "allowOverwriteArtifact")] + public bool? AllowOverwriteArtifact { get; set; } + + /// + /// Gets or sets specifies whether skipping tiles that are missing + /// their model or report in target stage workspace is allowed. If + /// required but not allowed, deployment will fail. + /// + [JsonProperty(PropertyName = "allowSkipTilesWithMissingPrerequisites")] + public bool? AllowSkipTilesWithMissingPrerequisites { get; set; } + + /// + /// Gets or sets specify whether deleting all data from the target + /// artifact is allowed in case of a schema mismatch. If required but + /// not allowed, deployment will fail. + /// + [JsonProperty(PropertyName = "allowPurgeData")] + public bool? AllowPurgeData { get; set; } + + /// + /// Gets or sets specify whether taking ownership of the target + /// artifact is allowed for paginated report. If required but not + /// allowed, deployment will fail. + /// + [JsonProperty(PropertyName = "allowTakeOver")] + public bool? AllowTakeOver { get; set; } + + /// + /// Gets or sets specify whether changing the target artifact label is + /// allowed. The label is changed when the source is protected but the + /// target is not. If required but not allowed, deployment will fail. + /// + [JsonProperty(PropertyName = "allowOverwriteTargetArtifactLabel")] + public bool? AllowOverwriteTargetArtifactLabel { get; set; } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DeploymentSourceAndTarget.cs b/sdk/PowerBI.Api/Source/Models/DeploymentSourceAndTarget.cs new file mode 100644 index 00000000..d80e1696 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DeploymentSourceAndTarget.cs @@ -0,0 +1,70 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Source and target items. + /// + public partial class DeploymentSourceAndTarget + { + /// + /// Initializes a new instance of the DeploymentSourceAndTarget class. + /// + public DeploymentSourceAndTarget() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DeploymentSourceAndTarget class. + /// + /// The ID of the artifact being deployed from the + /// source stage. + /// The ID of the artifact being overwritten on + /// the target stage. Only applicable when overwriting an + /// artifact. + public DeploymentSourceAndTarget(System.Guid source, System.Guid? target = default(System.Guid?)) + { + Source = source; + Target = target; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the ID of the artifact being deployed from the source + /// stage. + /// + [JsonProperty(PropertyName = "source")] + public System.Guid Source { get; set; } + + /// + /// Gets or sets the ID of the artifact being overwritten on the target + /// stage. Only applicable when overwriting an artifact. + /// + [JsonProperty(PropertyName = "target")] + public System.Guid? Target { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DeploymentStepType.cs b/sdk/PowerBI.Api/Source/Models/DeploymentStepType.cs new file mode 100644 index 00000000..ef23e28d --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DeploymentStepType.cs @@ -0,0 +1,117 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + + /// + /// Defines values for DeploymentStepType. + /// + /// + /// Determine base value for a given allowed value if exists, else return + /// the value itself + /// + [JsonConverter(typeof(DeploymentStepTypeConverter))] + public struct DeploymentStepType : System.IEquatable + { + private DeploymentStepType(string underlyingValue) + { + UnderlyingValue=underlyingValue; + } + + /// + /// A step for deploying a single dataset + /// + public static readonly DeploymentStepType DatasetDeployment = "DatasetDeployment"; + + /// + /// A step for deploying a single report + /// + public static readonly DeploymentStepType ReportDeployment = "ReportDeployment"; + + /// + /// A step for deploying a single dashboard + /// + public static readonly DeploymentStepType DashboardDeployment = "DashboardDeployment"; + + /// + /// A step for deploying a single dataflow + /// + public static readonly DeploymentStepType DataflowDeployment = "DataflowDeployment"; + + + /// + /// Underlying value of enum DeploymentStepType + /// + private readonly string UnderlyingValue; + + /// + /// Returns string representation for DeploymentStepType + /// + public override string ToString() + { + return UnderlyingValue.ToString(); + } + + /// + /// Compares enums of type DeploymentStepType + /// + public bool Equals(DeploymentStepType e) + { + return UnderlyingValue.Equals(e.UnderlyingValue); + } + + /// + /// Implicit operator to convert string to DeploymentStepType + /// + public static implicit operator DeploymentStepType(string value) + { + return new DeploymentStepType(value); + } + + /// + /// Implicit operator to convert DeploymentStepType to string + /// + public static implicit operator string(DeploymentStepType e) + { + return e.UnderlyingValue; + } + + /// + /// Overriding == operator for enum DeploymentStepType + /// + public static bool operator == (DeploymentStepType e1, DeploymentStepType e2) + { + return e2.Equals(e1); + } + + /// + /// Overriding != operator for enum DeploymentStepType + /// + public static bool operator != (DeploymentStepType e1, DeploymentStepType e2) + { + return !e2.Equals(e1); + } + + /// + /// Overrides Equals operator for DeploymentStepType + /// + public override bool Equals(object obj) + { + return obj is DeploymentStepType && Equals((DeploymentStepType)obj); + } + + /// + /// Returns for hashCode DeploymentStepType + /// + public override int GetHashCode() + { + return UnderlyingValue.GetHashCode(); + } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DeploymentStepTypeConverter.cs b/sdk/PowerBI.Api/Source/Models/DeploymentStepTypeConverter.cs new file mode 100644 index 00000000..451a2e89 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/DeploymentStepTypeConverter.cs @@ -0,0 +1,49 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + + using System.Reflection; + + /// + /// Defines values for DeploymentStepType. + /// + public sealed class DeploymentStepTypeConverter : JsonConverter + { + + /// + /// Returns if objectType can be converted to DeploymentStepType by the + /// converter. + /// + public override bool CanConvert(System.Type objectType) + { + return typeof(DeploymentStepType).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); + } + + /// + /// Overrides ReadJson and converts token to DeploymentStepType. + /// + public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) + { + if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) + { + return null; + } + return (DeploymentStepType)serializer.Deserialize(reader); + } + + /// + /// Overriding WriteJson for DeploymentStepType for serialization. + /// + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteValue(value.ToString()); + } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/DirectQueryRefreshSchedule.cs b/sdk/PowerBI.Api/Source/Models/DirectQueryRefreshSchedule.cs index b5236294..69704852 100644 --- a/sdk/PowerBI.Api/Source/Models/DirectQueryRefreshSchedule.cs +++ b/sdk/PowerBI.Api/Source/Models/DirectQueryRefreshSchedule.cs @@ -34,9 +34,9 @@ public DirectQueryRefreshSchedule() /// Days to execute the refresh /// Times to execute the refresh within each /// day - /// The Id of the Time zone to use. See + /// The ID of the time zone to use. See /// [Time Zone - /// Info](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id). + /// Info](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id) public DirectQueryRefreshSchedule(int? frequency = default(int?), IList days = default(IList), IList times = default(IList), string localTimeZoneId = default(string)) { Frequency = frequency; @@ -71,8 +71,8 @@ public DirectQueryRefreshSchedule() public IList Times { get; set; } /// - /// Gets or sets the Id of the Time zone to use. See [Time Zone - /// Info](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id). + /// Gets or sets the ID of the time zone to use. See [Time Zone + /// Info](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id) /// [JsonProperty(PropertyName = "localTimeZoneId")] public string LocalTimeZoneId { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/EmbedToken.cs b/sdk/PowerBI.Api/Source/Models/EmbedToken.cs index 72e7bed6..f6a22a83 100644 --- a/sdk/PowerBI.Api/Source/Models/EmbedToken.cs +++ b/sdk/PowerBI.Api/Source/Models/EmbedToken.cs @@ -27,9 +27,9 @@ public EmbedToken() /// Initializes a new instance of the EmbedToken class. /// /// Embed token - /// Unique token Id. Can be used to correlate - /// operations that use this token with the generate operation through - /// audit logs. + /// The unique token ID, which can be used to + /// correlate operations that use this token with the generate + /// operation through audit logs /// Expiration time of token. In UTC. public EmbedToken(string token, System.Guid tokenId, System.DateTime expiration) { @@ -51,8 +51,9 @@ public EmbedToken(string token, System.Guid tokenId, System.DateTime expiration) public string Token { get; set; } /// - /// Gets or sets unique token Id. Can be used to correlate operations - /// that use this token with the generate operation through audit logs. + /// Gets or sets the unique token ID, which can be used to correlate + /// operations that use this token with the generate operation through + /// audit logs /// [JsonProperty(PropertyName = "tokenId")] public System.Guid TokenId { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/Gateway.cs b/sdk/PowerBI.Api/Source/Models/Gateway.cs index 384898b8..ceb738f9 100644 --- a/sdk/PowerBI.Api/Source/Models/Gateway.cs +++ b/sdk/PowerBI.Api/Source/Models/Gateway.cs @@ -25,7 +25,9 @@ public Gateway() /// /// Initializes a new instance of the Gateway class. /// - /// The gateway id + /// The gateway ID. When using a gateway cluster, the + /// gateway ID refers to the primary (first) gateway in the cluster. In + /// such cases, gateway ID is similar to gateway cluster ID. /// The gateway name /// The gateway type /// Gateway metadata in json @@ -49,7 +51,9 @@ public Gateway() partial void CustomInit(); /// - /// Gets or sets the gateway id + /// Gets or sets the gateway ID. When using a gateway cluster, the + /// gateway ID refers to the primary (first) gateway in the cluster. In + /// such cases, gateway ID is similar to gateway cluster ID. /// [JsonProperty(PropertyName = "id")] public System.Guid Id { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/GatewayDatasource.cs b/sdk/PowerBI.Api/Source/Models/GatewayDatasource.cs index d9e23af4..3882f785 100644 --- a/sdk/PowerBI.Api/Source/Models/GatewayDatasource.cs +++ b/sdk/PowerBI.Api/Source/Models/GatewayDatasource.cs @@ -25,16 +25,50 @@ public GatewayDatasource() /// /// Initializes a new instance of the GatewayDatasource class. /// - /// The unique id for this datasource - /// The associated gateway id + /// The unique ID for this datasource + /// The associated gateway ID. When using a + /// gateway cluster, the gateway ID refers to the primary (first) + /// gateway in the cluster. In such cases, gateway ID is similar to + /// gateway cluster ID. /// Type of the datasource credentials. /// Possible values include: 'Basic', 'Windows', 'Anonymous', 'OAuth2', /// 'Key' /// The name of the datasource - /// The type of the datasource + /// The type of the + /// datasource:<ul><li>Sql + /// </li><li>AnalysisServices </li><li>SAPHana + /// </li><li>File </li><li>Folder + /// </li><li>Oracle </li><li>Teradata + /// </li><li>SharePointList </li><li>Web + /// </li><li>OData </li><li>DB2 + /// </li><li>MySql </li><li>PostgreSql + /// </li><li>Sybase </li><li>Extension + /// </li><li>SAPBW </li><li>AzureTables + /// </li><li>AzureBlobs </li><li>Informix + /// </li><li>ODBC </li><li>Excel + /// </li><li>SharePoint </li><li>PubNub + /// </li><li>MQ </li><li>BizTalk + /// </li><li>GoogleAnalytics + /// </li><li>CustomHttpApi </li><li>Exchange + /// </li><li>Facebook </li><li>HDInsight + /// </li><li>AzureMarketplace + /// </li><li>ActiveDirectory </li><li>Hdfs + /// </li><li>SharePointDocLib + /// </li><li>PowerQueryMashup </li><li>OleDb + /// </li><li>AdoDotNet </li><li>Salesforce + /// </li><li>CustomConnector + /// </li><li>SAPBWMessageServer + /// </li><li>AdobeAnalytics </li><li>Essbase + /// </li><li>AzureDataLakeStorage + /// </li><li>SapErp </li><li>UIFlow + /// </li><li>CDPA </li><li>EventHub + /// </li></ul> /// Connection details in json /// format - public GatewayDatasource(System.Guid id, System.Guid gatewayId, CredentialType credentialType, string datasourceName = default(string), string datasourceType = default(string), string connectionDetails = default(string)) + /// The connection details of the + /// datasource that need to be updated. This is mandataory when the + /// dataset has more than one datasource. + public GatewayDatasource(System.Guid id, System.Guid gatewayId, CredentialType credentialType, string datasourceName = default(string), string datasourceType = default(string), string connectionDetails = default(string), GatewayDatasourceCredentialDetails credentialDetails = default(GatewayDatasourceCredentialDetails)) { Id = id; GatewayId = gatewayId; @@ -42,6 +76,7 @@ public GatewayDatasource() DatasourceType = datasourceType; ConnectionDetails = connectionDetails; CredentialType = credentialType; + CredentialDetails = credentialDetails; CustomInit(); } @@ -51,13 +86,16 @@ public GatewayDatasource() partial void CustomInit(); /// - /// Gets or sets the unique id for this datasource + /// Gets or sets the unique ID for this datasource /// [JsonProperty(PropertyName = "id")] public System.Guid Id { get; set; } /// - /// Gets or sets the associated gateway id + /// Gets or sets the associated gateway ID. When using a gateway + /// cluster, the gateway ID refers to the primary (first) gateway in + /// the cluster. In such cases, gateway ID is similar to gateway + /// cluster ID. /// [JsonProperty(PropertyName = "gatewayId")] public System.Guid GatewayId { get; set; } @@ -69,7 +107,55 @@ public GatewayDatasource() public string DatasourceName { get; set; } /// - /// Gets or sets the type of the datasource + /// Gets or sets the type of the + /// datasource:&lt;ul&gt;&lt;li&gt;Sql + /// &lt;/li&gt;&lt;li&gt;AnalysisServices + /// &lt;/li&gt;&lt;li&gt;SAPHana + /// &lt;/li&gt;&lt;li&gt;File + /// &lt;/li&gt;&lt;li&gt;Folder + /// &lt;/li&gt;&lt;li&gt;Oracle + /// &lt;/li&gt;&lt;li&gt;Teradata + /// &lt;/li&gt;&lt;li&gt;SharePointList + /// &lt;/li&gt;&lt;li&gt;Web + /// &lt;/li&gt;&lt;li&gt;OData + /// &lt;/li&gt;&lt;li&gt;DB2 + /// &lt;/li&gt;&lt;li&gt;MySql + /// &lt;/li&gt;&lt;li&gt;PostgreSql + /// &lt;/li&gt;&lt;li&gt;Sybase + /// &lt;/li&gt;&lt;li&gt;Extension + /// &lt;/li&gt;&lt;li&gt;SAPBW + /// &lt;/li&gt;&lt;li&gt;AzureTables + /// &lt;/li&gt;&lt;li&gt;AzureBlobs + /// &lt;/li&gt;&lt;li&gt;Informix + /// &lt;/li&gt;&lt;li&gt;ODBC + /// &lt;/li&gt;&lt;li&gt;Excel + /// &lt;/li&gt;&lt;li&gt;SharePoint + /// &lt;/li&gt;&lt;li&gt;PubNub + /// &lt;/li&gt;&lt;li&gt;MQ + /// &lt;/li&gt;&lt;li&gt;BizTalk + /// &lt;/li&gt;&lt;li&gt;GoogleAnalytics + /// &lt;/li&gt;&lt;li&gt;CustomHttpApi + /// &lt;/li&gt;&lt;li&gt;Exchange + /// &lt;/li&gt;&lt;li&gt;Facebook + /// &lt;/li&gt;&lt;li&gt;HDInsight + /// &lt;/li&gt;&lt;li&gt;AzureMarketplace + /// &lt;/li&gt;&lt;li&gt;ActiveDirectory + /// &lt;/li&gt;&lt;li&gt;Hdfs + /// &lt;/li&gt;&lt;li&gt;SharePointDocLib + /// &lt;/li&gt;&lt;li&gt;PowerQueryMashup + /// &lt;/li&gt;&lt;li&gt;OleDb + /// &lt;/li&gt;&lt;li&gt;AdoDotNet + /// &lt;/li&gt;&lt;li&gt;Salesforce + /// &lt;/li&gt;&lt;li&gt;CustomConnector + /// &lt;/li&gt;&lt;li&gt;SAPBWMessageServer + /// &lt;/li&gt;&lt;li&gt;AdobeAnalytics + /// &lt;/li&gt;&lt;li&gt;Essbase + /// &lt;/li&gt;&lt;li&gt;AzureDataLakeStorage + /// &lt;/li&gt;&lt;li&gt;SapErp + /// &lt;/li&gt;&lt;li&gt;UIFlow + /// &lt;/li&gt;&lt;li&gt;CDPA + /// &lt;/li&gt;&lt;li&gt;EventHub + /// &lt;/li&gt;&lt;/ul&gt; /// [JsonProperty(PropertyName = "datasourceType")] public string DatasourceType { get; set; } @@ -87,6 +173,14 @@ public GatewayDatasource() [JsonProperty(PropertyName = "credentialType")] public CredentialType CredentialType { get; set; } + /// + /// Gets or sets the connection details of the datasource that need to + /// be updated. This is mandataory when the dataset has more than one + /// datasource. + /// + [JsonProperty(PropertyName = "credentialDetails")] + public GatewayDatasourceCredentialDetails CredentialDetails { get; set; } + /// /// Validate the object. /// diff --git a/sdk/PowerBI.Api/Source/Models/GatewayDatasourceCredentialDetails.cs b/sdk/PowerBI.Api/Source/Models/GatewayDatasourceCredentialDetails.cs new file mode 100644 index 00000000..dd31c102 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/GatewayDatasourceCredentialDetails.cs @@ -0,0 +1,52 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The datasource credential details + /// + public partial class GatewayDatasourceCredentialDetails + { + /// + /// Initializes a new instance of the + /// GatewayDatasourceCredentialDetails class. + /// + public GatewayDatasourceCredentialDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// GatewayDatasourceCredentialDetails class. + /// + /// Indicates if the end-user + /// OAuth2 credentials are used for connecting to the datasource in + /// DirectQuery mode. + public GatewayDatasourceCredentialDetails(bool? useEndUserOAuth2Credentials = default(bool?)) + { + UseEndUserOAuth2Credentials = useEndUserOAuth2Credentials; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets indicates if the end-user OAuth2 credentials are used + /// for connecting to the datasource in DirectQuery mode. + /// + [JsonProperty(PropertyName = "useEndUserOAuth2Credentials")] + public bool? UseEndUserOAuth2Credentials { get; set; } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/GenerateTokenRequest.cs b/sdk/PowerBI.Api/Source/Models/GenerateTokenRequest.cs index 91f6bce8..cfa1b842 100644 --- a/sdk/PowerBI.Api/Source/Models/GenerateTokenRequest.cs +++ b/sdk/PowerBI.Api/Source/Models/GenerateTokenRequest.cs @@ -30,8 +30,9 @@ public GenerateTokenRequest() /// Required access level for EmbedToken /// generation. Possible values include: 'View', 'Edit', /// 'Create' - /// Dataset id for report creation. Only - /// applies when generating EmbedToken for report creation. + /// The dataset ID used for report creation. + /// Only applies when generating an EmbedToken for report + /// creation. /// Indicates an embedded report can be saved /// as a new report. Default value is 'false'. Only applies when /// generating EmbedToken for report embedding. @@ -59,8 +60,8 @@ public GenerateTokenRequest() public TokenAccessLevel? AccessLevel { get; set; } /// - /// Gets or sets dataset id for report creation. Only applies when - /// generating EmbedToken for report creation. + /// Gets or sets the dataset ID used for report creation. Only applies + /// when generating an EmbedToken for report creation. /// [JsonProperty(PropertyName = "datasetId")] public string DatasetId { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/GenerateTokenRequestV2Dataset.cs b/sdk/PowerBI.Api/Source/Models/GenerateTokenRequestV2Dataset.cs index 1a0c565a..6a540fcd 100644 --- a/sdk/PowerBI.Api/Source/Models/GenerateTokenRequestV2Dataset.cs +++ b/sdk/PowerBI.Api/Source/Models/GenerateTokenRequestV2Dataset.cs @@ -28,7 +28,7 @@ public GenerateTokenRequestV2Dataset() /// Initializes a new instance of the GenerateTokenRequestV2Dataset /// class. /// - /// Dataset Id + /// The dataset ID public GenerateTokenRequestV2Dataset(string id) { Id = id; @@ -41,7 +41,7 @@ public GenerateTokenRequestV2Dataset(string id) partial void CustomInit(); /// - /// Gets or sets dataset Id + /// Gets or sets the dataset ID /// [JsonProperty(PropertyName = "id")] public string Id { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/GenerateTokenRequestV2Report.cs b/sdk/PowerBI.Api/Source/Models/GenerateTokenRequestV2Report.cs index a8e5505b..47d070cc 100644 --- a/sdk/PowerBI.Api/Source/Models/GenerateTokenRequestV2Report.cs +++ b/sdk/PowerBI.Api/Source/Models/GenerateTokenRequestV2Report.cs @@ -27,7 +27,7 @@ public GenerateTokenRequestV2Report() /// Initializes a new instance of the GenerateTokenRequestV2Report /// class. /// - /// Report Id + /// The report ID /// Indicates that the generated EmbedToken /// grand editing for this report public GenerateTokenRequestV2Report(System.Guid id, bool? allowEdit = default(bool?)) @@ -50,7 +50,7 @@ public GenerateTokenRequestV2Report() public bool? AllowEdit { get; set; } /// - /// Gets or sets report Id + /// Gets or sets the report ID /// [JsonProperty(PropertyName = "id")] public System.Guid Id { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/GenerateTokenRequestV2TargetWorkspace.cs b/sdk/PowerBI.Api/Source/Models/GenerateTokenRequestV2TargetWorkspace.cs index c6ac9bcd..b60f0144 100644 --- a/sdk/PowerBI.Api/Source/Models/GenerateTokenRequestV2TargetWorkspace.cs +++ b/sdk/PowerBI.Api/Source/Models/GenerateTokenRequestV2TargetWorkspace.cs @@ -27,7 +27,7 @@ public GenerateTokenRequestV2TargetWorkspace() /// Initializes a new instance of the /// GenerateTokenRequestV2TargetWorkspace class. /// - /// Workspace Id + /// The workspace ID public GenerateTokenRequestV2TargetWorkspace(System.Guid id) { Id = id; @@ -40,7 +40,7 @@ public GenerateTokenRequestV2TargetWorkspace(System.Guid id) partial void CustomInit(); /// - /// Gets or sets workspace Id + /// Gets or sets the workspace ID /// [JsonProperty(PropertyName = "id")] public System.Guid Id { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/Group.cs b/sdk/PowerBI.Api/Source/Models/Group.cs index 34d0b991..a85f6f48 100644 --- a/sdk/PowerBI.Api/Source/Models/Group.cs +++ b/sdk/PowerBI.Api/Source/Models/Group.cs @@ -27,12 +27,12 @@ public Group() /// /// Initializes a new instance of the Group class. /// - /// The workspace id + /// The workspace ID /// The group name /// Is the group read only /// Is the group on dedicated /// capacity - /// The capacity id + /// The capacity ID /// The group description. Available only for /// admin API calls. /// The type of group. Available only for admin API @@ -40,7 +40,11 @@ public Group() /// The group state. Available only for admin API /// calls. /// The users that belong to the group, and their - /// access rights. Available only for admin API calls. + /// access rights. This value will be empty. It will be removed from + /// the payload response in an upcoming release. To retrieve user + /// information on an artifact, please consider using the Get Group + /// User APIs, or the PostWorkspaceInfo API with the getArtifactUser + /// parameter. /// The reports that belong to the group. /// Available only for admin API calls. /// The dashboards that belong to the group. @@ -50,10 +54,13 @@ public Group() /// The dataflows that belong to the group. /// Available only for admin API calls. /// The Power BI dataflow storage - /// account id + /// account ID /// The workbooks that belong to the group. /// Available only for admin API calls. - public Group(System.Guid id, string name = default(string), bool? isReadOnly = default(bool?), bool? isOnDedicatedCapacity = default(bool?), System.Guid? capacityId = default(System.Guid?), string description = default(string), string type = default(string), string state = default(string), IList users = default(IList), IList reports = default(IList), IList dashboards = default(IList), IList datasets = default(IList), IList dataflows = default(IList), System.Guid? dataflowStorageId = default(System.Guid?), IList workbooks = default(IList)) + /// The deployment pipeline ID that the + /// workspace is assigned to. Available only for workspaces in the new + /// workspace experience and only for admin API calls. + public Group(System.Guid id, string name = default(string), bool? isReadOnly = default(bool?), bool? isOnDedicatedCapacity = default(bool?), System.Guid? capacityId = default(System.Guid?), string description = default(string), string type = default(string), string state = default(string), IList users = default(IList), IList reports = default(IList), IList dashboards = default(IList), IList datasets = default(IList), IList dataflows = default(IList), System.Guid? dataflowStorageId = default(System.Guid?), IList workbooks = default(IList), System.Guid? pipelineId = default(System.Guid?)) { Id = id; Name = name; @@ -70,6 +77,7 @@ public Group() Dataflows = dataflows; DataflowStorageId = dataflowStorageId; Workbooks = workbooks; + PipelineId = pipelineId; CustomInit(); } @@ -79,7 +87,7 @@ public Group() partial void CustomInit(); /// - /// Gets or sets the workspace id + /// Gets or sets the workspace ID /// [JsonProperty(PropertyName = "id")] public System.Guid Id { get; set; } @@ -103,7 +111,7 @@ public Group() public bool? IsOnDedicatedCapacity { get; set; } /// - /// Gets or sets the capacity id + /// Gets or sets the capacity ID /// [JsonProperty(PropertyName = "capacityId")] public System.Guid? CapacityId { get; set; } @@ -129,7 +137,11 @@ public Group() /// /// Gets or sets the users that belong to the group, and their access - /// rights. Available only for admin API calls. + /// rights. This value will be empty. It will be removed from the + /// payload response in an upcoming release. To retrieve user + /// information on an artifact, please consider using the Get Group + /// User APIs, or the PostWorkspaceInfo API with the getArtifactUser + /// parameter. /// [JsonProperty(PropertyName = "users")] public IList Users { get; set; } @@ -163,7 +175,7 @@ public Group() public IList Dataflows { get; set; } /// - /// Gets or sets the Power BI dataflow storage account id + /// Gets or sets the Power BI dataflow storage account ID /// [JsonProperty(PropertyName = "dataflowStorageId")] public System.Guid? DataflowStorageId { get; set; } @@ -175,6 +187,14 @@ public Group() [JsonProperty(PropertyName = "workbooks")] public IList Workbooks { get; set; } + /// + /// Gets or sets the deployment pipeline ID that the workspace is + /// assigned to. Available only for workspaces in the new workspace + /// experience and only for admin API calls. + /// + [JsonProperty(PropertyName = "pipelineId")] + public System.Guid? PipelineId { get; set; } + /// /// Validate the object. /// diff --git a/sdk/PowerBI.Api/Source/Models/GroupUser.cs b/sdk/PowerBI.Api/Source/Models/GroupUser.cs index 61be887d..e93455ef 100644 --- a/sdk/PowerBI.Api/Source/Models/GroupUser.cs +++ b/sdk/PowerBI.Api/Source/Models/GroupUser.cs @@ -26,21 +26,24 @@ public GroupUser() /// Initializes a new instance of the GroupUser class. /// /// Access rights user has for the - /// workspace. Possible values include: 'None', 'Member', 'Admin', - /// 'Contributor', 'Viewer' + /// workspace (Permission level). Possible values include: 'None', + /// 'Member', 'Admin', 'Contributor', 'Viewer' /// Email address of the user /// Display name of the principal /// [Object /// ID](/power-bi/developer/embedded/embedded-troubleshoot#what-is-the-difference-between-application-object-id-and-principal-object-id) /// of the principal - /// The principal type. Possible values - /// include: 'User', 'Group', 'App' - public GroupUser(GroupUserAccessRight groupUserAccessRight, string emailAddress = default(string), string displayName = default(string), string identifier = default(string), PrincipalType? principalType = default(PrincipalType?)) + /// Identifier of the principal in Microsoft + /// Graph. Only available for admin APIs. + /// Possible values include: 'None', + /// 'User', 'Group', 'App' + public GroupUser(GroupUserAccessRight groupUserAccessRight, string emailAddress = default(string), string displayName = default(string), string identifier = default(string), string graphId = default(string), PrincipalType? principalType = default(PrincipalType?)) { GroupUserAccessRight = groupUserAccessRight; EmailAddress = emailAddress; DisplayName = displayName; Identifier = identifier; + GraphId = graphId; PrincipalType = principalType; CustomInit(); } @@ -51,8 +54,9 @@ public GroupUser() partial void CustomInit(); /// - /// Gets or sets access rights user has for the workspace. Possible - /// values include: 'None', 'Member', 'Admin', 'Contributor', 'Viewer' + /// Gets or sets access rights user has for the workspace (Permission + /// level). Possible values include: 'None', 'Member', 'Admin', + /// 'Contributor', 'Viewer' /// [JsonProperty(PropertyName = "groupUserAccessRight")] public GroupUserAccessRight GroupUserAccessRight { get; set; } @@ -78,8 +82,15 @@ public GroupUser() public string Identifier { get; set; } /// - /// Gets or sets the principal type. Possible values include: 'User', - /// 'Group', 'App' + /// Gets or sets identifier of the principal in Microsoft Graph. Only + /// available for admin APIs. + /// + [JsonProperty(PropertyName = "graphId")] + public string GraphId { get; set; } + + /// + /// Gets or sets possible values include: 'None', 'User', 'Group', + /// 'App' /// [JsonProperty(PropertyName = "principalType")] public PrincipalType? PrincipalType { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/Import.cs b/sdk/PowerBI.Api/Source/Models/Import.cs index b7a0f3b7..c047b8bd 100644 --- a/sdk/PowerBI.Api/Source/Models/Import.cs +++ b/sdk/PowerBI.Api/Source/Models/Import.cs @@ -27,9 +27,10 @@ public Import() /// /// Initializes a new instance of the Import class. /// - /// The import id + /// The import ID /// The import name - /// The import upload state + /// The import upload state. Possible values + /// include: 'Publishing', 'Succeeded', 'Failed' /// The reports associated with this /// import /// The datasets associated with this @@ -54,7 +55,7 @@ public Import() partial void CustomInit(); /// - /// Gets or sets the import id + /// Gets or sets the import ID /// [JsonProperty(PropertyName = "id")] public System.Guid Id { get; set; } @@ -66,7 +67,8 @@ public Import() public string Name { get; set; } /// - /// Gets or sets the import upload state + /// Gets or sets the import upload state. Possible values include: + /// 'Publishing', 'Succeeded', 'Failed' /// [JsonProperty(PropertyName = "importState")] public string ImportState { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/InformationProtectionArtifactsChangeLabel.cs b/sdk/PowerBI.Api/Source/Models/InformationProtectionArtifactsChangeLabel.cs index 117db1d6..f6c3bbb9 100644 --- a/sdk/PowerBI.Api/Source/Models/InformationProtectionArtifactsChangeLabel.cs +++ b/sdk/PowerBI.Api/Source/Models/InformationProtectionArtifactsChangeLabel.cs @@ -12,8 +12,8 @@ namespace Microsoft.PowerBI.Api.Models using System.Linq; /// - /// Composite of artifact IDs that will be used to update the information - /// protection labels of those artifacts. + /// A composite of artifact IDs that will be used to update the information + /// protection labels of those artifacts /// public partial class InformationProtectionArtifactsChangeLabel { diff --git a/sdk/PowerBI.Api/Source/Models/InformationProtectionChangeLabelDetails.cs b/sdk/PowerBI.Api/Source/Models/InformationProtectionChangeLabelDetails.cs index d04f0f13..753318f3 100644 --- a/sdk/PowerBI.Api/Source/Models/InformationProtectionChangeLabelDetails.cs +++ b/sdk/PowerBI.Api/Source/Models/InformationProtectionChangeLabelDetails.cs @@ -28,8 +28,8 @@ public InformationProtectionChangeLabelDetails() /// Initializes a new instance of the /// InformationProtectionChangeLabelDetails class. /// - /// Composite of artifact ID lists per - /// type. + /// A composite of artifact ID lists for each + /// type /// Label ID (must be in the user’s /// policy). /// Delegated user details. A delegated @@ -55,7 +55,7 @@ public InformationProtectionChangeLabelDetails() partial void CustomInit(); /// - /// Gets or sets composite of artifact ID lists per type. + /// Gets or sets a composite of artifact ID lists for each type /// [JsonProperty(PropertyName = "artifacts")] public InformationProtectionArtifactsChangeLabel Artifacts { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/InformationProtectionChangeLabelResponse.cs b/sdk/PowerBI.Api/Source/Models/InformationProtectionChangeLabelResponse.cs index c076896c..99ef8807 100644 --- a/sdk/PowerBI.Api/Source/Models/InformationProtectionChangeLabelResponse.cs +++ b/sdk/PowerBI.Api/Source/Models/InformationProtectionChangeLabelResponse.cs @@ -12,7 +12,7 @@ namespace Microsoft.PowerBI.Api.Models using System.Linq; /// - /// Composite of artifact IDs and label change status. + /// A composite of artifact IDs and label change status /// public partial class InformationProtectionChangeLabelResponse { diff --git a/sdk/PowerBI.Api/Source/Models/InstallTicket.cs b/sdk/PowerBI.Api/Source/Models/InstallTicket.cs index 406d8b23..f6a0b875 100644 --- a/sdk/PowerBI.Api/Source/Models/InstallTicket.cs +++ b/sdk/PowerBI.Api/Source/Models/InstallTicket.cs @@ -27,9 +27,9 @@ public InstallTicket() /// Initializes a new instance of the InstallTicket class. /// /// Install ticket - /// Unique ticket Id. Can be used to correlate - /// operations that use this ticket with the generate operation through - /// audit logs. + /// The unique ID of a ticket, which can be used + /// to correlate operations that use this ticket with the generate + /// operation through audit logs /// Expiration time of token. In UTC. public InstallTicket(string ticket, System.Guid ticketId, System.DateTime expiration) { @@ -51,9 +51,9 @@ public InstallTicket(string ticket, System.Guid ticketId, System.DateTime expira public string Ticket { get; set; } /// - /// Gets or sets unique ticket Id. Can be used to correlate operations - /// that use this ticket with the generate operation through audit - /// logs. + /// Gets or sets the unique ID of a ticket, which can be used to + /// correlate operations that use this ticket with the generate + /// operation through audit logs /// [JsonProperty(PropertyName = "ticketId")] public System.Guid TicketId { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/Pipeline.cs b/sdk/PowerBI.Api/Source/Models/Pipeline.cs new file mode 100644 index 00000000..6cf41130 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/Pipeline.cs @@ -0,0 +1,117 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A Power BI deployment pipeline. + /// + public partial class Pipeline + { + /// + /// Initializes a new instance of the Pipeline class. + /// + public Pipeline() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Pipeline class. + /// + /// The deployment pipeline ID + /// The deployment pipeline display + /// name + /// The deployment pipeline + /// description + /// The deployment pipeline stages collection, + /// only returned when $expand stages is specified + /// The deployment pipeline users collection, only + /// returned when $expand users is specified and only in admin + /// API + public Pipeline(System.Guid id, string displayName = default(string), string description = default(string), IList stages = default(IList), IList users = default(IList)) + { + Id = id; + DisplayName = displayName; + Description = description; + Stages = stages; + Users = users; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the deployment pipeline ID + /// + [JsonProperty(PropertyName = "id")] + public System.Guid Id { get; set; } + + /// + /// Gets or sets the deployment pipeline display name + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets the deployment pipeline description + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets the deployment pipeline stages collection, only + /// returned when $expand stages is specified + /// + [JsonProperty(PropertyName = "stages")] + public IList Stages { get; set; } + + /// + /// Gets or sets the deployment pipeline users collection, only + /// returned when $expand users is specified and only in admin API + /// + [JsonProperty(PropertyName = "users")] + public IList Users { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Stages != null) + { + foreach (var element in Stages) + { + if (element != null) + { + element.Validate(); + } + } + } + if (Users != null) + { + foreach (var element1 in Users) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + } + } +} diff --git a/sdk/PowerBI.Api/Source/Models/PipelineNewWorkspaceRequest.cs b/sdk/PowerBI.Api/Source/Models/PipelineNewWorkspaceRequest.cs new file mode 100644 index 00000000..8b42f641 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/PipelineNewWorkspaceRequest.cs @@ -0,0 +1,66 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Configuration for creating a new workspace when deploying into a stage + /// which has no assigned workspaces. + /// + public partial class PipelineNewWorkspaceRequest + { + /// + /// Initializes a new instance of the PipelineNewWorkspaceRequest + /// class. + /// + public PipelineNewWorkspaceRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PipelineNewWorkspaceRequest + /// class. + /// + /// The name of the new workspace. + /// The ID of the capacity that the new + /// workspace will be assigned to. When unspecified, if you have + /// permissions for the source stage workspace capacity, this capacity + /// will be used. Otherwise, a capacity that you have permissions for, + /// will be selected. + public PipelineNewWorkspaceRequest(string name = default(string), System.Guid? capacityId = default(System.Guid?)) + { + Name = name; + CapacityId = capacityId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the new workspace. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the ID of the capacity that the new workspace will be + /// assigned to. When unspecified, if you have permissions for the + /// source stage workspace capacity, this capacity will be used. + /// Otherwise, a capacity that you have permissions for, will be + /// selected. + /// + [JsonProperty(PropertyName = "capacityId")] + public System.Guid? CapacityId { get; set; } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/PipelineOperation.cs b/sdk/PowerBI.Api/Source/Models/PipelineOperation.cs new file mode 100644 index 00000000..f5e0fbbe --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/PipelineOperation.cs @@ -0,0 +1,132 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// A Power BI deployment pipeline operation. + /// + public partial class PipelineOperation + { + /// + /// Initializes a new instance of the PipelineOperation class. + /// + public PipelineOperation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PipelineOperation class. + /// + /// The operation ID. + /// The pipeline operation status. Possible values + /// include: 'NotStarted', 'Executing', 'Succeeded', 'Failed' + /// The last time the operation was + /// updated. + /// The operation type. Possible values include: + /// 'Deploy' + /// The time the operation execution + /// started. + /// The time the operation execution + /// ended. + /// The source stage order. Development + /// (0), Test (1), Production (2). + /// The target stage order. Development + /// (0), Test (1), Production (2). + /// The deployment execution plan. Only + /// applicable when getting a single operation. + public PipelineOperation(System.Guid id, PipelineOperationStatus status, System.DateTime lastUpdatedTime, PipelineOperationType? type = default(PipelineOperationType?), System.DateTime? executionStartTime = default(System.DateTime?), System.DateTime? executionEndTime = default(System.DateTime?), int? sourceStageOrder = default(int?), int? targetStageOrder = default(int?), DeploymentExecutionPlan executionPlan = default(DeploymentExecutionPlan)) + { + Id = id; + Type = type; + Status = status; + LastUpdatedTime = lastUpdatedTime; + ExecutionStartTime = executionStartTime; + ExecutionEndTime = executionEndTime; + SourceStageOrder = sourceStageOrder; + TargetStageOrder = targetStageOrder; + ExecutionPlan = executionPlan; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the operation ID. + /// + [JsonProperty(PropertyName = "id")] + public System.Guid Id { get; set; } + + /// + /// Gets or sets the operation type. Possible values include: 'Deploy' + /// + [JsonProperty(PropertyName = "type")] + public PipelineOperationType? Type { get; set; } + + /// + /// Gets or sets the pipeline operation status. Possible values + /// include: 'NotStarted', 'Executing', 'Succeeded', 'Failed' + /// + [JsonProperty(PropertyName = "status")] + public PipelineOperationStatus Status { get; set; } + + /// + /// Gets or sets the last time the operation was updated. + /// + [JsonProperty(PropertyName = "lastUpdatedTime")] + public System.DateTime LastUpdatedTime { get; set; } + + /// + /// Gets or sets the time the operation execution started. + /// + [JsonProperty(PropertyName = "executionStartTime")] + public System.DateTime? ExecutionStartTime { get; set; } + + /// + /// Gets or sets the time the operation execution ended. + /// + [JsonProperty(PropertyName = "executionEndTime")] + public System.DateTime? ExecutionEndTime { get; set; } + + /// + /// Gets or sets the source stage order. Development (0), Test (1), + /// Production (2). + /// + [JsonProperty(PropertyName = "sourceStageOrder")] + public int? SourceStageOrder { get; set; } + + /// + /// Gets or sets the target stage order. Development (0), Test (1), + /// Production (2). + /// + [JsonProperty(PropertyName = "targetStageOrder")] + public int? TargetStageOrder { get; set; } + + /// + /// Gets or sets the deployment execution plan. Only applicable when + /// getting a single operation. + /// + [JsonProperty(PropertyName = "executionPlan")] + public DeploymentExecutionPlan ExecutionPlan { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/sdk/PowerBI.Api/Source/Models/PipelineOperationStatus.cs b/sdk/PowerBI.Api/Source/Models/PipelineOperationStatus.cs new file mode 100644 index 00000000..090d00c2 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/PipelineOperationStatus.cs @@ -0,0 +1,117 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + + /// + /// Defines values for PipelineOperationStatus. + /// + /// + /// Determine base value for a given allowed value if exists, else return + /// the value itself + /// + [JsonConverter(typeof(PipelineOperationStatusConverter))] + public struct PipelineOperationStatus : System.IEquatable + { + private PipelineOperationStatus(string underlyingValue) + { + UnderlyingValue=underlyingValue; + } + + /// + /// Operation not started + /// + public static readonly PipelineOperationStatus NotStarted = "NotStarted"; + + /// + /// Operation executing + /// + public static readonly PipelineOperationStatus Executing = "Executing"; + + /// + /// Operation succeeded + /// + public static readonly PipelineOperationStatus Succeeded = "Succeeded"; + + /// + /// Operation failed + /// + public static readonly PipelineOperationStatus Failed = "Failed"; + + + /// + /// Underlying value of enum PipelineOperationStatus + /// + private readonly string UnderlyingValue; + + /// + /// Returns string representation for PipelineOperationStatus + /// + public override string ToString() + { + return UnderlyingValue.ToString(); + } + + /// + /// Compares enums of type PipelineOperationStatus + /// + public bool Equals(PipelineOperationStatus e) + { + return UnderlyingValue.Equals(e.UnderlyingValue); + } + + /// + /// Implicit operator to convert string to PipelineOperationStatus + /// + public static implicit operator PipelineOperationStatus(string value) + { + return new PipelineOperationStatus(value); + } + + /// + /// Implicit operator to convert PipelineOperationStatus to string + /// + public static implicit operator string(PipelineOperationStatus e) + { + return e.UnderlyingValue; + } + + /// + /// Overriding == operator for enum PipelineOperationStatus + /// + public static bool operator == (PipelineOperationStatus e1, PipelineOperationStatus e2) + { + return e2.Equals(e1); + } + + /// + /// Overriding != operator for enum PipelineOperationStatus + /// + public static bool operator != (PipelineOperationStatus e1, PipelineOperationStatus e2) + { + return !e2.Equals(e1); + } + + /// + /// Overrides Equals operator for PipelineOperationStatus + /// + public override bool Equals(object obj) + { + return obj is PipelineOperationStatus && Equals((PipelineOperationStatus)obj); + } + + /// + /// Returns for hashCode PipelineOperationStatus + /// + public override int GetHashCode() + { + return UnderlyingValue.GetHashCode(); + } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/PipelineOperationStatusConverter.cs b/sdk/PowerBI.Api/Source/Models/PipelineOperationStatusConverter.cs new file mode 100644 index 00000000..23ed289f --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/PipelineOperationStatusConverter.cs @@ -0,0 +1,49 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + + using System.Reflection; + + /// + /// Defines values for PipelineOperationStatus. + /// + public sealed class PipelineOperationStatusConverter : JsonConverter + { + + /// + /// Returns if objectType can be converted to PipelineOperationStatus + /// by the converter. + /// + public override bool CanConvert(System.Type objectType) + { + return typeof(PipelineOperationStatus).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); + } + + /// + /// Overrides ReadJson and converts token to PipelineOperationStatus. + /// + public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) + { + if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) + { + return null; + } + return (PipelineOperationStatus)serializer.Deserialize(reader); + } + + /// + /// Overriding WriteJson for PipelineOperationStatus for serialization. + /// + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteValue(value.ToString()); + } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/PipelineOperationType.cs b/sdk/PowerBI.Api/Source/Models/PipelineOperationType.cs new file mode 100644 index 00000000..74b3016c --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/PipelineOperationType.cs @@ -0,0 +1,102 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + + /// + /// Defines values for PipelineOperationType. + /// + /// + /// Determine base value for a given allowed value if exists, else return + /// the value itself + /// + [JsonConverter(typeof(PipelineOperationTypeConverter))] + public struct PipelineOperationType : System.IEquatable + { + private PipelineOperationType(string underlyingValue) + { + UnderlyingValue=underlyingValue; + } + + /// + /// Deploy content between stages + /// + public static readonly PipelineOperationType Deploy = "Deploy"; + + + /// + /// Underlying value of enum PipelineOperationType + /// + private readonly string UnderlyingValue; + + /// + /// Returns string representation for PipelineOperationType + /// + public override string ToString() + { + return UnderlyingValue.ToString(); + } + + /// + /// Compares enums of type PipelineOperationType + /// + public bool Equals(PipelineOperationType e) + { + return UnderlyingValue.Equals(e.UnderlyingValue); + } + + /// + /// Implicit operator to convert string to PipelineOperationType + /// + public static implicit operator PipelineOperationType(string value) + { + return new PipelineOperationType(value); + } + + /// + /// Implicit operator to convert PipelineOperationType to string + /// + public static implicit operator string(PipelineOperationType e) + { + return e.UnderlyingValue; + } + + /// + /// Overriding == operator for enum PipelineOperationType + /// + public static bool operator == (PipelineOperationType e1, PipelineOperationType e2) + { + return e2.Equals(e1); + } + + /// + /// Overriding != operator for enum PipelineOperationType + /// + public static bool operator != (PipelineOperationType e1, PipelineOperationType e2) + { + return !e2.Equals(e1); + } + + /// + /// Overrides Equals operator for PipelineOperationType + /// + public override bool Equals(object obj) + { + return obj is PipelineOperationType && Equals((PipelineOperationType)obj); + } + + /// + /// Returns for hashCode PipelineOperationType + /// + public override int GetHashCode() + { + return UnderlyingValue.GetHashCode(); + } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/PipelineOperationTypeConverter.cs b/sdk/PowerBI.Api/Source/Models/PipelineOperationTypeConverter.cs new file mode 100644 index 00000000..6ddaee04 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/PipelineOperationTypeConverter.cs @@ -0,0 +1,49 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + + using System.Reflection; + + /// + /// Defines values for PipelineOperationType. + /// + public sealed class PipelineOperationTypeConverter : JsonConverter + { + + /// + /// Returns if objectType can be converted to PipelineOperationType by + /// the converter. + /// + public override bool CanConvert(System.Type objectType) + { + return typeof(PipelineOperationType).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); + } + + /// + /// Overrides ReadJson and converts token to PipelineOperationType. + /// + public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) + { + if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) + { + return null; + } + return (PipelineOperationType)serializer.Deserialize(reader); + } + + /// + /// Overriding WriteJson for PipelineOperationType for serialization. + /// + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteValue(value.ToString()); + } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/PipelineOperations.cs b/sdk/PowerBI.Api/Source/Models/PipelineOperations.cs new file mode 100644 index 00000000..28d31033 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/PipelineOperations.cs @@ -0,0 +1,59 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Odata response wrapper for a Power BI deployment pipeline operation + /// collection + /// + public partial class PipelineOperations + { + /// + /// Initializes a new instance of the PipelineOperations class. + /// + public PipelineOperations() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PipelineOperations class. + /// + /// OData context + /// The deployment pipeline operations + /// collection + public PipelineOperations(string odatacontext = default(string), IList value = default(IList)) + { + Odatacontext = odatacontext; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets oData context + /// + [JsonProperty(PropertyName = "odata.context")] + public string Odatacontext { get; set; } + + /// + /// Gets or sets the deployment pipeline operations collection + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/PipelineStage.cs b/sdk/PowerBI.Api/Source/Models/PipelineStage.cs new file mode 100644 index 00000000..7924bea8 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/PipelineStage.cs @@ -0,0 +1,78 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// A Power BI deployment pipeline stage. + /// + public partial class PipelineStage + { + /// + /// Initializes a new instance of the PipelineStage class. + /// + public PipelineStage() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PipelineStage class. + /// + /// The stage order, starting from zero. + /// The assigned workspae ID, only applicable + /// when there is an assigned workspace. + /// The assigned workspae name, only + /// applicable when there is an assigned workspace and the user has + /// access to the workspace. + public PipelineStage(int order, System.Guid? workspaceId = default(System.Guid?), string workspaceName = default(string)) + { + Order = order; + WorkspaceId = workspaceId; + WorkspaceName = workspaceName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the stage order, starting from zero. + /// + [JsonProperty(PropertyName = "order")] + public int Order { get; set; } + + /// + /// Gets or sets the assigned workspae ID, only applicable when there + /// is an assigned workspace. + /// + [JsonProperty(PropertyName = "workspaceId")] + public System.Guid? WorkspaceId { get; set; } + + /// + /// Gets or sets the assigned workspae name, only applicable when there + /// is an assigned workspace and the user has access to the workspace. + /// + [JsonProperty(PropertyName = "workspaceName")] + public string WorkspaceName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} diff --git a/sdk/PowerBI.Api/Source/Models/PipelineStageArtifactBase.cs b/sdk/PowerBI.Api/Source/Models/PipelineStageArtifactBase.cs new file mode 100644 index 00000000..3e41778a --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/PipelineStageArtifactBase.cs @@ -0,0 +1,103 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The deployment pipeline stage artifact metadata. + /// + public partial class PipelineStageArtifactBase + { + /// + /// Initializes a new instance of the PipelineStageArtifactBase class. + /// + public PipelineStageArtifactBase() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PipelineStageArtifactBase class. + /// + /// The artifact ID. + /// The artifact dispaly + /// name. + /// The artifact ID from the workspace + /// of the source stage, which will update the current artifact upon + /// deployment. Applicable only when the user has at least contributor + /// access to the source stage workspace. + /// The artifact ID from the workspace + /// of the target stage, which will be updated by the current artifact + /// upon deployment. Applicable only when the user has at least + /// contributor access to the target stage workspace. + /// The artifact's last deployment + /// time. + public PipelineStageArtifactBase(System.Guid artifactId, string artifactDisplayName = default(string), System.Guid? sourceArtifactId = default(System.Guid?), System.Guid? targetArtifactId = default(System.Guid?), System.DateTime? lastDeploymentTime = default(System.DateTime?)) + { + ArtifactId = artifactId; + ArtifactDisplayName = artifactDisplayName; + SourceArtifactId = sourceArtifactId; + TargetArtifactId = targetArtifactId; + LastDeploymentTime = lastDeploymentTime; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the artifact ID. + /// + [JsonProperty(PropertyName = "artifactId")] + public System.Guid ArtifactId { get; set; } + + /// + /// Gets or sets the artifact dispaly name. + /// + [JsonProperty(PropertyName = "artifactDisplayName")] + public string ArtifactDisplayName { get; set; } + + /// + /// Gets or sets the artifact ID from the workspace of the source + /// stage, which will update the current artifact upon deployment. + /// Applicable only when the user has at least contributor access to + /// the source stage workspace. + /// + [JsonProperty(PropertyName = "sourceArtifactId")] + public System.Guid? SourceArtifactId { get; set; } + + /// + /// Gets or sets the artifact ID from the workspace of the target + /// stage, which will be updated by the current artifact upon + /// deployment. Applicable only when the user has at least contributor + /// access to the target stage workspace. + /// + [JsonProperty(PropertyName = "targetArtifactId")] + public System.Guid? TargetArtifactId { get; set; } + + /// + /// Gets or sets the artifact's last deployment time. + /// + [JsonProperty(PropertyName = "lastDeploymentTime ")] + public System.DateTime? LastDeploymentTime { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} diff --git a/sdk/PowerBI.Api/Source/Models/PipelineStageArtifacts.cs b/sdk/PowerBI.Api/Source/Models/PipelineStageArtifacts.cs new file mode 100644 index 00000000..cb937e98 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/PipelineStageArtifacts.cs @@ -0,0 +1,74 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Supported items from a workspace assigned to a deployment pipeline + /// stage. + /// + public partial class PipelineStageArtifacts + { + /// + /// Initializes a new instance of the PipelineStageArtifacts class. + /// + public PipelineStageArtifacts() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PipelineStageArtifacts class. + /// + /// The datasets collection + /// The reports collection + /// The dashboards collection + /// The dataflows collection + public PipelineStageArtifacts(IList datasets = default(IList), IList reports = default(IList), IList dashboards = default(IList), IList dataflows = default(IList)) + { + Datasets = datasets; + Reports = reports; + Dashboards = dashboards; + Dataflows = dataflows; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the datasets collection + /// + [JsonProperty(PropertyName = "datasets")] + public IList Datasets { get; set; } + + /// + /// Gets or sets the reports collection + /// + [JsonProperty(PropertyName = "reports")] + public IList Reports { get; set; } + + /// + /// Gets or sets the dashboards collection + /// + [JsonProperty(PropertyName = "dashboards")] + public IList Dashboards { get; set; } + + /// + /// Gets or sets the dataflows collection + /// + [JsonProperty(PropertyName = "dataflows")] + public IList Dataflows { get; set; } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/PipelineStageDashboard.cs b/sdk/PowerBI.Api/Source/Models/PipelineStageDashboard.cs new file mode 100644 index 00000000..c4ec2a7a --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/PipelineStageDashboard.cs @@ -0,0 +1,62 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using System.Linq; + + /// + /// The deployment pipeline dashboard metadata. + /// + public partial class PipelineStageDashboard : PipelineStageArtifactBase + { + /// + /// Initializes a new instance of the PipelineStageDashboard class. + /// + public PipelineStageDashboard() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PipelineStageDashboard class. + /// + /// The artifact ID. + /// The artifact dispaly + /// name. + /// The artifact ID from the workspace + /// of the source stage, which will update the current artifact upon + /// deployment. Applicable only when the user has at least contributor + /// access to the source stage workspace. + /// The artifact ID from the workspace + /// of the target stage, which will be updated by the current artifact + /// upon deployment. Applicable only when the user has at least + /// contributor access to the target stage workspace. + /// The artifact's last deployment + /// time. + public PipelineStageDashboard(System.Guid artifactId, string artifactDisplayName = default(string), System.Guid? sourceArtifactId = default(System.Guid?), System.Guid? targetArtifactId = default(System.Guid?), System.DateTime? lastDeploymentTime = default(System.DateTime?)) + : base(artifactId, artifactDisplayName, sourceArtifactId, targetArtifactId, lastDeploymentTime) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/PowerBI.Api/Source/Models/PipelineStageDataflow.cs b/sdk/PowerBI.Api/Source/Models/PipelineStageDataflow.cs new file mode 100644 index 00000000..27574aeb --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/PipelineStageDataflow.cs @@ -0,0 +1,62 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using System.Linq; + + /// + /// The deployment pipeline dataflow metadata. + /// + public partial class PipelineStageDataflow : PipelineStageArtifactBase + { + /// + /// Initializes a new instance of the PipelineStageDataflow class. + /// + public PipelineStageDataflow() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PipelineStageDataflow class. + /// + /// The artifact ID. + /// The artifact dispaly + /// name. + /// The artifact ID from the workspace + /// of the source stage, which will update the current artifact upon + /// deployment. Applicable only when the user has at least contributor + /// access to the source stage workspace. + /// The artifact ID from the workspace + /// of the target stage, which will be updated by the current artifact + /// upon deployment. Applicable only when the user has at least + /// contributor access to the target stage workspace. + /// The artifact's last deployment + /// time. + public PipelineStageDataflow(System.Guid artifactId, string artifactDisplayName = default(string), System.Guid? sourceArtifactId = default(System.Guid?), System.Guid? targetArtifactId = default(System.Guid?), System.DateTime? lastDeploymentTime = default(System.DateTime?)) + : base(artifactId, artifactDisplayName, sourceArtifactId, targetArtifactId, lastDeploymentTime) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/PowerBI.Api/Source/Models/PipelineStageDataset.cs b/sdk/PowerBI.Api/Source/Models/PipelineStageDataset.cs new file mode 100644 index 00000000..4efb2331 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/PipelineStageDataset.cs @@ -0,0 +1,62 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using System.Linq; + + /// + /// The deployment pipeline dataset metadata. + /// + public partial class PipelineStageDataset : PipelineStageArtifactBase + { + /// + /// Initializes a new instance of the PipelineStageDataset class. + /// + public PipelineStageDataset() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PipelineStageDataset class. + /// + /// The artifact ID. + /// The artifact dispaly + /// name. + /// The artifact ID from the workspace + /// of the source stage, which will update the current artifact upon + /// deployment. Applicable only when the user has at least contributor + /// access to the source stage workspace. + /// The artifact ID from the workspace + /// of the target stage, which will be updated by the current artifact + /// upon deployment. Applicable only when the user has at least + /// contributor access to the target stage workspace. + /// The artifact's last deployment + /// time. + public PipelineStageDataset(System.Guid artifactId, string artifactDisplayName = default(string), System.Guid? sourceArtifactId = default(System.Guid?), System.Guid? targetArtifactId = default(System.Guid?), System.DateTime? lastDeploymentTime = default(System.DateTime?)) + : base(artifactId, artifactDisplayName, sourceArtifactId, targetArtifactId, lastDeploymentTime) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/PowerBI.Api/Source/Models/PipelineStageReport.cs b/sdk/PowerBI.Api/Source/Models/PipelineStageReport.cs new file mode 100644 index 00000000..5ae77894 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/PipelineStageReport.cs @@ -0,0 +1,62 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using System.Linq; + + /// + /// The deployment pipeline report metadata. + /// + public partial class PipelineStageReport : PipelineStageArtifactBase + { + /// + /// Initializes a new instance of the PipelineStageReport class. + /// + public PipelineStageReport() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PipelineStageReport class. + /// + /// The artifact ID. + /// The artifact dispaly + /// name. + /// The artifact ID from the workspace + /// of the source stage, which will update the current artifact upon + /// deployment. Applicable only when the user has at least contributor + /// access to the source stage workspace. + /// The artifact ID from the workspace + /// of the target stage, which will be updated by the current artifact + /// upon deployment. Applicable only when the user has at least + /// contributor access to the target stage workspace. + /// The artifact's last deployment + /// time. + public PipelineStageReport(System.Guid artifactId, string artifactDisplayName = default(string), System.Guid? sourceArtifactId = default(System.Guid?), System.Guid? targetArtifactId = default(System.Guid?), System.DateTime? lastDeploymentTime = default(System.DateTime?)) + : base(artifactId, artifactDisplayName, sourceArtifactId, targetArtifactId, lastDeploymentTime) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/PowerBI.Api/Source/Models/PipelineUpdateAppSettings.cs b/sdk/PowerBI.Api/Source/Models/PipelineUpdateAppSettings.cs new file mode 100644 index 00000000..c45ded4c --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/PipelineUpdateAppSettings.cs @@ -0,0 +1,48 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Configuration update org app after deployment + /// + public partial class PipelineUpdateAppSettings + { + /// + /// Initializes a new instance of the PipelineUpdateAppSettings class. + /// + public PipelineUpdateAppSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PipelineUpdateAppSettings class. + /// + /// Whether to update the app + /// in the target workspace + public PipelineUpdateAppSettings(bool? updateAppInTargetWorkspace = default(bool?)) + { + UpdateAppInTargetWorkspace = updateAppInTargetWorkspace; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets whether to update the app in the target workspace + /// + [JsonProperty(PropertyName = "updateAppInTargetWorkspace")] + public bool? UpdateAppInTargetWorkspace { get; set; } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/PipelineUser.cs b/sdk/PowerBI.Api/Source/Models/PipelineUser.cs new file mode 100644 index 00000000..eac55649 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/PipelineUser.cs @@ -0,0 +1,88 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A Power BI user access right entry for a deployment pipeline. + /// + public partial class PipelineUser + { + /// + /// Initializes a new instance of the PipelineUser class. + /// + public PipelineUser() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PipelineUser class. + /// + /// For Principal type 'User' provide UPN , + /// otherwise provide [Object + /// ID](/power-bi/developer/embedded/embedded-troubleshoot#what-is-the-difference-between-application-object-id-and-principal-object-id) + /// of the principal + /// Possible values include: 'None', + /// 'User', 'Group', 'App' + /// **Required** - Access rights a user has + /// for the deployment pipeline. Possible values include: + /// 'Admin' + public PipelineUser(string identifier, PrincipalType principalType, PipelineUserAccessRight? accessRight = default(PipelineUserAccessRight?)) + { + AccessRight = accessRight; + Identifier = identifier; + PrincipalType = principalType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets **Required** - Access rights a user has for the + /// deployment pipeline. Possible values include: 'Admin' + /// + [JsonProperty(PropertyName = "accessRight")] + public PipelineUserAccessRight? AccessRight { get; set; } + + /// + /// Gets or sets for Principal type 'User' provide UPN , otherwise + /// provide [Object + /// ID](/power-bi/developer/embedded/embedded-troubleshoot#what-is-the-difference-between-application-object-id-and-principal-object-id) + /// of the principal + /// + [JsonProperty(PropertyName = "identifier")] + public string Identifier { get; set; } + + /// + /// Gets or sets possible values include: 'None', 'User', 'Group', + /// 'App' + /// + [JsonProperty(PropertyName = "principalType")] + public PrincipalType PrincipalType { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Identifier == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Identifier"); + } + } + } +} diff --git a/sdk/PowerBI.Api/Source/Models/PipelineUserAccessRight.cs b/sdk/PowerBI.Api/Source/Models/PipelineUserAccessRight.cs new file mode 100644 index 00000000..ac744b8d --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/PipelineUserAccessRight.cs @@ -0,0 +1,102 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + + /// + /// Defines values for PipelineUserAccessRight. + /// + /// + /// Determine base value for a given allowed value if exists, else return + /// the value itself + /// + [JsonConverter(typeof(PipelineUserAccessRightConverter))] + public struct PipelineUserAccessRight : System.IEquatable + { + private PipelineUserAccessRight(string underlyingValue) + { + UnderlyingValue=underlyingValue; + } + + /// + /// Grants administrator rights to a deployment pipeine + /// + public static readonly PipelineUserAccessRight Admin = "Admin"; + + + /// + /// Underlying value of enum PipelineUserAccessRight + /// + private readonly string UnderlyingValue; + + /// + /// Returns string representation for PipelineUserAccessRight + /// + public override string ToString() + { + return UnderlyingValue.ToString(); + } + + /// + /// Compares enums of type PipelineUserAccessRight + /// + public bool Equals(PipelineUserAccessRight e) + { + return UnderlyingValue.Equals(e.UnderlyingValue); + } + + /// + /// Implicit operator to convert string to PipelineUserAccessRight + /// + public static implicit operator PipelineUserAccessRight(string value) + { + return new PipelineUserAccessRight(value); + } + + /// + /// Implicit operator to convert PipelineUserAccessRight to string + /// + public static implicit operator string(PipelineUserAccessRight e) + { + return e.UnderlyingValue; + } + + /// + /// Overriding == operator for enum PipelineUserAccessRight + /// + public static bool operator == (PipelineUserAccessRight e1, PipelineUserAccessRight e2) + { + return e2.Equals(e1); + } + + /// + /// Overriding != operator for enum PipelineUserAccessRight + /// + public static bool operator != (PipelineUserAccessRight e1, PipelineUserAccessRight e2) + { + return !e2.Equals(e1); + } + + /// + /// Overrides Equals operator for PipelineUserAccessRight + /// + public override bool Equals(object obj) + { + return obj is PipelineUserAccessRight && Equals((PipelineUserAccessRight)obj); + } + + /// + /// Returns for hashCode PipelineUserAccessRight + /// + public override int GetHashCode() + { + return UnderlyingValue.GetHashCode(); + } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/PipelineUserAccessRightConverter.cs b/sdk/PowerBI.Api/Source/Models/PipelineUserAccessRightConverter.cs new file mode 100644 index 00000000..dc9b56c9 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/PipelineUserAccessRightConverter.cs @@ -0,0 +1,49 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + + using System.Reflection; + + /// + /// Defines values for PipelineUserAccessRight. + /// + public sealed class PipelineUserAccessRightConverter : JsonConverter + { + + /// + /// Returns if objectType can be converted to PipelineUserAccessRight + /// by the converter. + /// + public override bool CanConvert(System.Type objectType) + { + return typeof(PipelineUserAccessRight).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); + } + + /// + /// Overrides ReadJson and converts token to PipelineUserAccessRight. + /// + public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) + { + if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) + { + return null; + } + return (PipelineUserAccessRight)serializer.Deserialize(reader); + } + + /// + /// Overriding WriteJson for PipelineUserAccessRight for serialization. + /// + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteValue(value.ToString()); + } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/PipelineUsers.cs b/sdk/PowerBI.Api/Source/Models/PipelineUsers.cs new file mode 100644 index 00000000..f076e3e7 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/PipelineUsers.cs @@ -0,0 +1,59 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Odata response wrapper for a Power BI deployment pipeline users + /// collection. + /// + public partial class PipelineUsers + { + /// + /// Initializes a new instance of the PipelineUsers class. + /// + public PipelineUsers() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PipelineUsers class. + /// + /// OData context + /// The deployment pipeline users + /// collection + public PipelineUsers(string odatacontext = default(string), IList value = default(IList)) + { + Odatacontext = odatacontext; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets oData context + /// + [JsonProperty(PropertyName = "odata.context")] + public string Odatacontext { get; set; } + + /// + /// Gets or sets the deployment pipeline users collection + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/Pipelines.cs b/sdk/PowerBI.Api/Source/Models/Pipelines.cs new file mode 100644 index 00000000..be6b4c78 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/Pipelines.cs @@ -0,0 +1,57 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Odata response wrapper for a Power BI deployment pipeline collection. + /// + public partial class Pipelines + { + /// + /// Initializes a new instance of the Pipelines class. + /// + public Pipelines() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Pipelines class. + /// + /// OData context + /// The deployment pipelines collection + public Pipelines(string odatacontext = default(string), IList value = default(IList)) + { + Odatacontext = odatacontext; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets oData context + /// + [JsonProperty(PropertyName = "odata.context")] + public string Odatacontext { get; set; } + + /// + /// Gets or sets the deployment pipelines collection + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/PrincipalType.cs b/sdk/PowerBI.Api/Source/Models/PrincipalType.cs index 320762ac..0731199f 100644 --- a/sdk/PowerBI.Api/Source/Models/PrincipalType.cs +++ b/sdk/PowerBI.Api/Source/Models/PrincipalType.cs @@ -23,6 +23,11 @@ private PrincipalType(string underlyingValue) UnderlyingValue=underlyingValue; } + /// + /// None principal type, used for whole organization level access. + /// + public static readonly PrincipalType None = "None"; + /// /// User principal type /// diff --git a/sdk/PowerBI.Api/Source/Models/RefreshSchedule.cs b/sdk/PowerBI.Api/Source/Models/RefreshSchedule.cs index 4dee0242..ff03a798 100644 --- a/sdk/PowerBI.Api/Source/Models/RefreshSchedule.cs +++ b/sdk/PowerBI.Api/Source/Models/RefreshSchedule.cs @@ -31,9 +31,9 @@ public RefreshSchedule() /// Times to execute the refresh within each /// day /// Is the refresh enabled - /// The Id of the Time zone to use. See + /// The ID of the time zone to use. See /// [Time Zone - /// Info](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id). + /// Info](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id) /// Notification option at scheduled refresh /// termination. Possible values include: 'NoNotification', /// 'MailOnFailure' @@ -71,8 +71,8 @@ public RefreshSchedule() public bool? Enabled { get; set; } /// - /// Gets or sets the Id of the Time zone to use. See [Time Zone - /// Info](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id). + /// Gets or sets the ID of the time zone to use. See [Time Zone + /// Info](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id) /// [JsonProperty(PropertyName = "localTimeZoneId")] public string LocalTimeZoneId { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/Refreshable.cs b/sdk/PowerBI.Api/Source/Models/Refreshable.cs index 85c7f76d..fff93748 100644 --- a/sdk/PowerBI.Api/Source/Models/Refreshable.cs +++ b/sdk/PowerBI.Api/Source/Models/Refreshable.cs @@ -27,7 +27,7 @@ public Refreshable() /// /// Initializes a new instance of the Refreshable class. /// - /// Object id of refreshable + /// The object ID of the refreshable /// Display name of refreshable /// The refreshable kind. Possible values include: /// 'Dataset' @@ -43,8 +43,9 @@ public Refreshable() /// refresh within the summary time window /// The median duration in seconds of a /// refresh within the summary time window - /// The number of refreshes per day - /// within the summary time window + /// The number of refreshes + /// (schedule+onDemand) per day within the summary time window with at + /// most 60 /// The last Power BI refresh history entry /// for the refreshable item /// The refresh schedule for the @@ -80,7 +81,7 @@ public Refreshable() partial void CustomInit(); /// - /// Gets or sets object id of refreshable + /// Gets or sets the object ID of the refreshable /// [JsonProperty(PropertyName = "id")] public string Id { get; set; } @@ -140,8 +141,8 @@ public Refreshable() public double? MedianDuration { get; set; } /// - /// Gets or sets the number of refreshes per day within the summary - /// time window + /// Gets or sets the number of refreshes (schedule+onDemand) per day + /// within the summary time window with at most 60 /// [JsonProperty(PropertyName = "refreshesPerDay")] public int? RefreshesPerDay { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/Report.cs b/sdk/PowerBI.Api/Source/Models/Report.cs index c1bed918..2bae420f 100644 --- a/sdk/PowerBI.Api/Source/Models/Report.cs +++ b/sdk/PowerBI.Api/Source/Models/Report.cs @@ -7,6 +7,8 @@ namespace Microsoft.PowerBI.Api.Models { using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -28,13 +30,14 @@ public Report() /// /// Initializes a new instance of the Report class. /// - /// The report id + /// The report ID /// The report name /// The report web url /// The report embed url - /// The dataset id + /// The dataset ID /// The report description - /// The report owner + /// The report owner. Available only for + /// reports created after June 2019. /// The user that modified this report /// The report created date time. /// The report modified date @@ -44,7 +47,12 @@ public Report() /// The report sensitivity label /// The report type. Possible values include: /// 'PaginatedReport' - public Report(System.Guid id, string name = default(string), string webUrl = default(string), string embedUrl = default(string), string datasetId = default(string), string description = default(string), string createdBy = default(string), string modifiedBy = default(string), System.DateTime? createdDateTime = default(System.DateTime?), System.DateTime? modifiedDateTime = default(System.DateTime?), EndorsementDetails endorsementDetails = default(EndorsementDetails), SensitivityLabel sensitivityLabel = default(SensitivityLabel), string reportType = default(string)) + /// The Report User Access Details. This value will + /// be empty. It will be removed from the payload response in an + /// upcoming release. To retrieve user information on an artifact, + /// please consider using the Get Report User as Admin APIs, or the + /// PostWorkspaceInfo API with the getArtifactUser parameter. + public Report(System.Guid id, string name = default(string), string webUrl = default(string), string embedUrl = default(string), string datasetId = default(string), string description = default(string), string createdBy = default(string), string modifiedBy = default(string), System.DateTime? createdDateTime = default(System.DateTime?), System.DateTime? modifiedDateTime = default(System.DateTime?), EndorsementDetails endorsementDetails = default(EndorsementDetails), SensitivityLabel sensitivityLabel = default(SensitivityLabel), string reportType = default(string), IList users = default(IList)) { Id = id; Name = name; @@ -59,6 +67,7 @@ public Report() EndorsementDetails = endorsementDetails; SensitivityLabel = sensitivityLabel; ReportType = reportType; + Users = users; CustomInit(); } @@ -68,7 +77,7 @@ public Report() partial void CustomInit(); /// - /// Gets or sets the report id + /// Gets or sets the report ID /// [JsonProperty(PropertyName = "id")] public System.Guid Id { get; set; } @@ -92,7 +101,7 @@ public Report() public string EmbedUrl { get; set; } /// - /// Gets or sets the dataset id + /// Gets or sets the dataset ID /// [JsonProperty(PropertyName = "datasetId")] public string DatasetId { get; set; } @@ -104,7 +113,8 @@ public Report() public string Description { get; set; } /// - /// Gets or sets the report owner + /// Gets or sets the report owner. Available only for reports created + /// after June 2019. /// [JsonProperty(PropertyName = "createdBy")] public string CreatedBy { get; set; } @@ -146,6 +156,16 @@ public Report() [JsonProperty(PropertyName = "reportType")] public string ReportType { get; set; } + /// + /// Gets or sets the Report User Access Details. This value will be + /// empty. It will be removed from the payload response in an upcoming + /// release. To retrieve user information on an artifact, please + /// consider using the Get Report User as Admin APIs, or the + /// PostWorkspaceInfo API with the getArtifactUser parameter. + /// + [JsonProperty(PropertyName = "users")] + public IList Users { get; set; } + /// /// Validate the object. /// @@ -158,6 +178,16 @@ public virtual void Validate() { SensitivityLabel.Validate(); } + if (Users != null) + { + foreach (var element in Users) + { + if (element != null) + { + element.Validate(); + } + } + } } } } diff --git a/sdk/PowerBI.Api/Source/Models/ReportUser.cs b/sdk/PowerBI.Api/Source/Models/ReportUser.cs new file mode 100644 index 00000000..a87861c8 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/ReportUser.cs @@ -0,0 +1,104 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// A Power BI user access right entry for report + /// + public partial class ReportUser + { + /// + /// Initializes a new instance of the ReportUser class. + /// + public ReportUser() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ReportUser class. + /// + /// Access rights user has for the + /// report (Permission level). Possible values include: 'None', 'Read', + /// 'ReadWrite', 'ReadReshare', 'Owner' + /// Email address of the user + /// Display name of the principal + /// Identifier of the principal + /// Identifier of the principal in Microsoft + /// Graph. Only available for admin APIs. + /// Possible values include: 'None', + /// 'User', 'Group', 'App' + public ReportUser(ReportUserAccessRight reportUserAccessRight, string emailAddress = default(string), string displayName = default(string), string identifier = default(string), string graphId = default(string), PrincipalType? principalType = default(PrincipalType?)) + { + ReportUserAccessRight = reportUserAccessRight; + EmailAddress = emailAddress; + DisplayName = displayName; + Identifier = identifier; + GraphId = graphId; + PrincipalType = principalType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets access rights user has for the report (Permission + /// level). Possible values include: 'None', 'Read', 'ReadWrite', + /// 'ReadReshare', 'Owner' + /// + [JsonProperty(PropertyName = "reportUserAccessRight")] + public ReportUserAccessRight ReportUserAccessRight { get; set; } + + /// + /// Gets or sets email address of the user + /// + [JsonProperty(PropertyName = "emailAddress")] + public string EmailAddress { get; set; } + + /// + /// Gets or sets display name of the principal + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets identifier of the principal + /// + [JsonProperty(PropertyName = "identifier")] + public string Identifier { get; set; } + + /// + /// Gets or sets identifier of the principal in Microsoft Graph. Only + /// available for admin APIs. + /// + [JsonProperty(PropertyName = "graphId")] + public string GraphId { get; set; } + + /// + /// Gets or sets possible values include: 'None', 'User', 'Group', + /// 'App' + /// + [JsonProperty(PropertyName = "principalType")] + public PrincipalType? PrincipalType { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/sdk/PowerBI.Api/Source/Models/ReportUserAccessRight.cs b/sdk/PowerBI.Api/Source/Models/ReportUserAccessRight.cs new file mode 100644 index 00000000..f7bf6ea8 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/ReportUserAccessRight.cs @@ -0,0 +1,122 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + + /// + /// Defines values for ReportUserAccessRight. + /// + /// + /// Determine base value for a given allowed value if exists, else return + /// the value itself + /// + [JsonConverter(typeof(ReportUserAccessRightConverter))] + public struct ReportUserAccessRight : System.IEquatable + { + private ReportUserAccessRight(string underlyingValue) + { + UnderlyingValue=underlyingValue; + } + + /// + /// No permission to content in report + /// + public static readonly ReportUserAccessRight None = "None"; + + /// + /// Grants Read access to content in report + /// + public static readonly ReportUserAccessRight Read = "Read"; + + /// + /// Grants Read and Write access to content in report + /// + public static readonly ReportUserAccessRight ReadWrite = "ReadWrite"; + + /// + /// Grants Read and Reshare access to content in report + /// + public static readonly ReportUserAccessRight ReadReshare = "ReadReshare"; + + /// + /// Grants Read, Write and Reshare access to content in report + /// + public static readonly ReportUserAccessRight Owner = "Owner"; + + + /// + /// Underlying value of enum ReportUserAccessRight + /// + private readonly string UnderlyingValue; + + /// + /// Returns string representation for ReportUserAccessRight + /// + public override string ToString() + { + return UnderlyingValue.ToString(); + } + + /// + /// Compares enums of type ReportUserAccessRight + /// + public bool Equals(ReportUserAccessRight e) + { + return UnderlyingValue.Equals(e.UnderlyingValue); + } + + /// + /// Implicit operator to convert string to ReportUserAccessRight + /// + public static implicit operator ReportUserAccessRight(string value) + { + return new ReportUserAccessRight(value); + } + + /// + /// Implicit operator to convert ReportUserAccessRight to string + /// + public static implicit operator string(ReportUserAccessRight e) + { + return e.UnderlyingValue; + } + + /// + /// Overriding == operator for enum ReportUserAccessRight + /// + public static bool operator == (ReportUserAccessRight e1, ReportUserAccessRight e2) + { + return e2.Equals(e1); + } + + /// + /// Overriding != operator for enum ReportUserAccessRight + /// + public static bool operator != (ReportUserAccessRight e1, ReportUserAccessRight e2) + { + return !e2.Equals(e1); + } + + /// + /// Overrides Equals operator for ReportUserAccessRight + /// + public override bool Equals(object obj) + { + return obj is ReportUserAccessRight && Equals((ReportUserAccessRight)obj); + } + + /// + /// Returns for hashCode ReportUserAccessRight + /// + public override int GetHashCode() + { + return UnderlyingValue.GetHashCode(); + } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/ReportUserAccessRightConverter.cs b/sdk/PowerBI.Api/Source/Models/ReportUserAccessRightConverter.cs new file mode 100644 index 00000000..8e3cf157 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/ReportUserAccessRightConverter.cs @@ -0,0 +1,49 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + + using System.Reflection; + + /// + /// Defines values for ReportUserAccessRight. + /// + public sealed class ReportUserAccessRightConverter : JsonConverter + { + + /// + /// Returns if objectType can be converted to ReportUserAccessRight by + /// the converter. + /// + public override bool CanConvert(System.Type objectType) + { + return typeof(ReportUserAccessRight).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); + } + + /// + /// Overrides ReadJson and converts token to ReportUserAccessRight. + /// + public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) + { + if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) + { + return null; + } + return (ReportUserAccessRight)serializer.Deserialize(reader); + } + + /// + /// Overriding WriteJson for ReportUserAccessRight for serialization. + /// + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteValue(value.ToString()); + } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/ReportUsers.cs b/sdk/PowerBI.Api/Source/Models/ReportUsers.cs new file mode 100644 index 00000000..d56039ef --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/ReportUsers.cs @@ -0,0 +1,55 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Odata response wrapper for a Power BI user access right for report List + /// + public partial class ReportUsers + { + /// + /// Initializes a new instance of the ReportUsers class. + /// + public ReportUsers() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ReportUsers class. + /// + /// The user access right for report List + public ReportUsers(string odatacontext = default(string), IList value = default(IList)) + { + Odatacontext = odatacontext; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "odata.context")] + public string Odatacontext { get; set; } + + /// + /// Gets or sets the user access right for report List + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + } +} diff --git a/sdk/PowerBI.Api/Source/Models/Row.cs b/sdk/PowerBI.Api/Source/Models/Row.cs index 0d84feab..589cc48e 100644 --- a/sdk/PowerBI.Api/Source/Models/Row.cs +++ b/sdk/PowerBI.Api/Source/Models/Row.cs @@ -25,7 +25,7 @@ public Row() /// /// Initializes a new instance of the Row class. /// - /// The unique row id + /// The unique row ID public Row(string id = default(string)) { Id = id; @@ -38,7 +38,7 @@ public Row() partial void CustomInit(); /// - /// Gets or sets the unique row id + /// Gets or sets the unique row ID /// [JsonProperty(PropertyName = "id")] public string Id { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/SelectiveDeployRequest.cs b/sdk/PowerBI.Api/Source/Models/SelectiveDeployRequest.cs new file mode 100644 index 00000000..b2dc5f44 --- /dev/null +++ b/sdk/PowerBI.Api/Source/Models/SelectiveDeployRequest.cs @@ -0,0 +1,137 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Request to selectively deploy items from a deployment pipeline stage + /// + public partial class SelectiveDeployRequest : DeployRequestBase + { + /// + /// Initializes a new instance of the SelectiveDeployRequest class. + /// + public SelectiveDeployRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SelectiveDeployRequest class. + /// + /// The order of the pipeline stages + /// that the content should be deployed from. + /// Whether the deployment should be + /// done into the previous stage, if not provided treated as + /// false. + /// Required for creating a new workspace + /// when deploying into a stage which has no assigned workspaces. If + /// not provided when required, deployment will fail. + /// Update org app in the target + /// workspace settings. + /// Options to control the behavior of the entire + /// deployment. + /// A list of datasets to be deployed + /// A list of reports to be deployed + /// A list of dashboards to be + /// deployed + /// A list of dataflows to be deployed + public SelectiveDeployRequest(int sourceStageOrder, bool? isBackwardDeployment = default(bool?), PipelineNewWorkspaceRequest newWorkspace = default(PipelineNewWorkspaceRequest), PipelineUpdateAppSettings updateAppSettings = default(PipelineUpdateAppSettings), DeploymentOptions options = default(DeploymentOptions), IList datasets = default(IList), IList reports = default(IList), IList dashboards = default(IList), IList dataflows = default(IList)) + : base(sourceStageOrder, isBackwardDeployment, newWorkspace, updateAppSettings, options) + { + Datasets = datasets; + Reports = reports; + Dashboards = dashboards; + Dataflows = dataflows; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a list of datasets to be deployed + /// + [JsonProperty(PropertyName = "datasets")] + public IList Datasets { get; set; } + + /// + /// Gets or sets a list of reports to be deployed + /// + [JsonProperty(PropertyName = "reports")] + public IList Reports { get; set; } + + /// + /// Gets or sets a list of dashboards to be deployed + /// + [JsonProperty(PropertyName = "dashboards")] + public IList Dashboards { get; set; } + + /// + /// Gets or sets a list of dataflows to be deployed + /// + [JsonProperty(PropertyName = "dataflows")] + public IList Dataflows { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Datasets != null) + { + foreach (var element in Datasets) + { + if (element != null) + { + element.Validate(); + } + } + } + if (Reports != null) + { + foreach (var element1 in Reports) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + if (Dashboards != null) + { + foreach (var element2 in Dashboards) + { + if (element2 != null) + { + element2.Validate(); + } + } + } + if (Dataflows != null) + { + foreach (var element3 in Dataflows) + { + if (element3 != null) + { + element3.Validate(); + } + } + } + } + } +} diff --git a/sdk/PowerBI.Api/Source/Models/SourceReport.cs b/sdk/PowerBI.Api/Source/Models/SourceReport.cs index cdb8a586..7eaf7e6f 100644 --- a/sdk/PowerBI.Api/Source/Models/SourceReport.cs +++ b/sdk/PowerBI.Api/Source/Models/SourceReport.cs @@ -25,8 +25,8 @@ public SourceReport() /// /// Initializes a new instance of the SourceReport class. /// - /// source report id - /// source worksapce id + /// The source report ID + /// The source workspace ID public SourceReport(System.Guid sourceReportId, System.Guid? sourceWorkspaceId = default(System.Guid?)) { SourceReportId = sourceReportId; @@ -40,13 +40,13 @@ public SourceReport() partial void CustomInit(); /// - /// Gets or sets source report id + /// Gets or sets the source report ID /// [JsonProperty(PropertyName = "sourceReportId")] public System.Guid SourceReportId { get; set; } /// - /// Gets or sets source worksapce id + /// Gets or sets the source workspace ID /// [JsonProperty(PropertyName = "sourceWorkspaceId")] public System.Guid? SourceWorkspaceId { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/Table.cs b/sdk/PowerBI.Api/Source/Models/Table.cs index 7f2010af..d11eeb87 100644 --- a/sdk/PowerBI.Api/Source/Models/Table.cs +++ b/sdk/PowerBI.Api/Source/Models/Table.cs @@ -32,12 +32,19 @@ public Table() /// The column schema for this table /// The data rows within this table /// The measures within this table - public Table(string name, IList columns, IList rows = default(IList), IList measures = default(IList)) + /// (Optional) Whether dataset table is + /// hidden + /// The table description + /// The table source + public Table(string name, IList columns, IList rows = default(IList), IList measures = default(IList), bool? isHidden = default(bool?), string description = default(string), IList source = default(IList)) { Name = name; Columns = columns; Rows = rows; Measures = measures; + IsHidden = isHidden; + Description = description; + Source = source; CustomInit(); } @@ -70,6 +77,24 @@ public Table() [JsonProperty(PropertyName = "measures")] public IList Measures { get; set; } + /// + /// Gets or sets (Optional) Whether dataset table is hidden + /// + [JsonProperty(PropertyName = "isHidden")] + public bool? IsHidden { get; set; } + + /// + /// Gets or sets the table description + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets the table source + /// + [JsonProperty(PropertyName = "source")] + public IList Source { get; set; } + /// /// Validate the object. /// @@ -113,6 +138,16 @@ public virtual void Validate() } } } + if (Source != null) + { + foreach (var element2 in Source) + { + if (element2 != null) + { + element2.Validate(); + } + } + } } } } diff --git a/sdk/PowerBI.Api/Source/Models/TemplateAppInstallDetails.cs b/sdk/PowerBI.Api/Source/Models/TemplateAppInstallDetails.cs index 1366bccc..1e4903c2 100644 --- a/sdk/PowerBI.Api/Source/Models/TemplateAppInstallDetails.cs +++ b/sdk/PowerBI.Api/Source/Models/TemplateAppInstallDetails.cs @@ -26,10 +26,10 @@ public TemplateAppInstallDetails() /// /// Initializes a new instance of the TemplateAppInstallDetails class. /// - /// Unique application Id. + /// The unique ID of the application /// Application version secure key - /// Application owner's tenant object - /// Id + /// The object ID for the application + /// owner's tenant /// Automated install configuration. public TemplateAppInstallDetails(System.Guid appId, string packageKey, System.Guid ownerTenantId, TemplateAppConfigurationRequest config = default(TemplateAppConfigurationRequest)) { @@ -46,7 +46,7 @@ public TemplateAppInstallDetails() partial void CustomInit(); /// - /// Gets or sets unique application Id. + /// Gets or sets the unique ID of the application /// [JsonProperty(PropertyName = "appId")] public System.Guid AppId { get; set; } @@ -58,7 +58,7 @@ public TemplateAppInstallDetails() public string PackageKey { get; set; } /// - /// Gets or sets application owner's tenant object Id + /// Gets or sets the object ID for the application owner's tenant /// [JsonProperty(PropertyName = "ownerTenantId")] public System.Guid OwnerTenantId { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/TenantKey.cs b/sdk/PowerBI.Api/Source/Models/TenantKey.cs index 6f1c4984..0509944b 100644 --- a/sdk/PowerBI.Api/Source/Models/TenantKey.cs +++ b/sdk/PowerBI.Api/Source/Models/TenantKey.cs @@ -25,15 +25,17 @@ public TenantKey() /// /// Initializes a new instance of the TenantKey class. /// - /// The id of the encryption key + /// The ID of the encryption key /// The name of the encryption key - /// Uri to the version of the Azure - /// Key Vault key - /// Indicates that this key is set as default - /// for the entire tenant. Any new capacity creation will inherit this - /// key upon creation - /// Encryption key creation time - /// Encryption key last update time + /// The URI that uniquely specifies + /// the encryption key in Azure Key Vault + /// Whether the encryption key is the default + /// key for the entire tenant. Any newly created capacity inherits the + /// default key. + /// The creation time of the encryption + /// key + /// The last update time of the encryption + /// key public TenantKey(System.Guid? id = default(System.Guid?), string name = default(string), string keyVaultKeyIdentifier = default(string), bool? isDefault = default(bool?), System.DateTime? createdAt = default(System.DateTime?), System.DateTime? updatedAt = default(System.DateTime?)) { Id = id; @@ -51,7 +53,7 @@ public TenantKey() partial void CustomInit(); /// - /// Gets or sets the id of the encryption key + /// Gets or sets the ID of the encryption key /// [JsonProperty(PropertyName = "id")] public System.Guid? Id { get; set; } @@ -63,27 +65,27 @@ public TenantKey() public string Name { get; set; } /// - /// Gets or sets uri to the version of the Azure Key Vault key + /// Gets or sets the URI that uniquely specifies the encryption key in + /// Azure Key Vault /// [JsonProperty(PropertyName = "keyVaultKeyIdentifier")] public string KeyVaultKeyIdentifier { get; set; } /// - /// Gets or sets indicates that this key is set as default for the - /// entire tenant. Any new capacity creation will inherit this key upon - /// creation + /// Gets or sets whether the encryption key is the default key for the + /// entire tenant. Any newly created capacity inherits the default key. /// [JsonProperty(PropertyName = "isDefault")] public bool? IsDefault { get; set; } /// - /// Gets or sets encryption key creation time + /// Gets or sets the creation time of the encryption key /// [JsonProperty(PropertyName = "createdAt")] public System.DateTime? CreatedAt { get; set; } /// - /// Gets or sets encryption key last update time + /// Gets or sets the last update time of the encryption key /// [JsonProperty(PropertyName = "updatedAt")] public System.DateTime? UpdatedAt { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/TenantKeyCreationRequest.cs b/sdk/PowerBI.Api/Source/Models/TenantKeyCreationRequest.cs index 55d5a6e5..a93365a3 100644 --- a/sdk/PowerBI.Api/Source/Models/TenantKeyCreationRequest.cs +++ b/sdk/PowerBI.Api/Source/Models/TenantKeyCreationRequest.cs @@ -26,11 +26,11 @@ public TenantKeyCreationRequest() /// Initializes a new instance of the TenantKeyCreationRequest class. /// /// The name of the encryption key - /// Uri to the version of the Azure - /// Key Vault key to be used - /// Indicates that this key is set as default - /// for the entire tenant. Any new capacity creation will inherit this - /// key upon creation + /// The URI that uniquely specifies + /// an encryption key in Azure Key Vault. + /// Whether an encryption key is the default + /// key for the entire tenant. Any newly created capacity inherits the + /// default key. /// Indicates to activate any inactivated /// capacities to use this key for its encryption public TenantKeyCreationRequest(string name = default(string), string keyVaultKeyIdentifier = default(string), bool? isDefault = default(bool?), bool? activate = default(bool?)) @@ -54,16 +54,15 @@ public TenantKeyCreationRequest() public string Name { get; set; } /// - /// Gets or sets uri to the version of the Azure Key Vault key to be - /// used + /// Gets or sets the URI that uniquely specifies an encryption key in + /// Azure Key Vault. /// [JsonProperty(PropertyName = "keyVaultKeyIdentifier")] public string KeyVaultKeyIdentifier { get; set; } /// - /// Gets or sets indicates that this key is set as default for the - /// entire tenant. Any new capacity creation will inherit this key upon - /// creation + /// Gets or sets whether an encryption key is the default key for the + /// entire tenant. Any newly created capacity inherits the default key. /// [JsonProperty(PropertyName = "isDefault")] public bool? IsDefault { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/TenantKeyRotationRequest.cs b/sdk/PowerBI.Api/Source/Models/TenantKeyRotationRequest.cs index 8434c6fd..c99af1a3 100644 --- a/sdk/PowerBI.Api/Source/Models/TenantKeyRotationRequest.cs +++ b/sdk/PowerBI.Api/Source/Models/TenantKeyRotationRequest.cs @@ -10,7 +10,7 @@ namespace Microsoft.PowerBI.Api.Models using System.Linq; /// - /// Rotate encryption key request + /// Request to rotate an encryption key /// public partial class TenantKeyRotationRequest { @@ -25,8 +25,8 @@ public TenantKeyRotationRequest() /// /// Initializes a new instance of the TenantKeyRotationRequest class. /// - /// Uri to the version of the Azure - /// Key Vault key to be used + /// The URI that uniquely specifies + /// the encryption key in Azure Key Vault public TenantKeyRotationRequest(string keyVaultKeyIdentifier = default(string)) { KeyVaultKeyIdentifier = keyVaultKeyIdentifier; @@ -39,8 +39,8 @@ public TenantKeyRotationRequest() partial void CustomInit(); /// - /// Gets or sets uri to the version of the Azure Key Vault key to be - /// used + /// Gets or sets the URI that uniquely specifies the encryption key in + /// Azure Key Vault /// [JsonProperty(PropertyName = "keyVaultKeyIdentifier")] public string KeyVaultKeyIdentifier { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/Tile.cs b/sdk/PowerBI.Api/Source/Models/Tile.cs index a1804054..ea73af3d 100644 --- a/sdk/PowerBI.Api/Source/Models/Tile.cs +++ b/sdk/PowerBI.Api/Source/Models/Tile.cs @@ -25,17 +25,17 @@ public Tile() /// /// Initializes a new instance of the Tile class. /// - /// The tile id + /// The tile ID /// The dashboard display name /// number of rows a tile should span /// number of columns a tile should span /// The tile embed url /// The tile embed data - /// The report id. Available only for tiles - /// created from a report. - /// The dataset id. Available only for tiles - /// created from a report or using a dataset; for example, Q&A - /// tiles. + /// The report ID, which is available only for + /// tiles created from a report + /// The dataset ID, which is available only for + /// tiles created from a report or using a dataset, such as Q&A + /// tiles public Tile(System.Guid id, string title = default(string), int? rowSpan = default(int?), int? colSpan = default(int?), string embedUrl = default(string), string embedData = default(string), System.Guid? reportId = default(System.Guid?), string datasetId = default(string)) { Id = id; @@ -55,7 +55,7 @@ public Tile() partial void CustomInit(); /// - /// Gets or sets the tile id + /// Gets or sets the tile ID /// [JsonProperty(PropertyName = "id")] public System.Guid Id { get; set; } @@ -91,15 +91,15 @@ public Tile() public string EmbedData { get; set; } /// - /// Gets or sets the report id. Available only for tiles created from a - /// report. + /// Gets or sets the report ID, which is available only for tiles + /// created from a report /// [JsonProperty(PropertyName = "reportId")] public System.Guid? ReportId { get; set; } /// - /// Gets or sets the dataset id. Available only for tiles created from - /// a report or using a dataset; for example, Q&amp;A tiles. + /// Gets or sets the dataset ID, which is available only for tiles + /// created from a report or using a dataset, such as Q&amp;A tiles /// [JsonProperty(PropertyName = "datasetId")] public string DatasetId { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/UpdateDatasourceConnectionRequest.cs b/sdk/PowerBI.Api/Source/Models/UpdateDatasourceConnectionRequest.cs index 9db3432c..618af20c 100644 --- a/sdk/PowerBI.Api/Source/Models/UpdateDatasourceConnectionRequest.cs +++ b/sdk/PowerBI.Api/Source/Models/UpdateDatasourceConnectionRequest.cs @@ -25,6 +25,11 @@ public UpdateDatasourceConnectionRequest() /// Initializes a new instance of the UpdateDatasourceConnectionRequest /// class. /// + /// The target connection details of + /// the updated datasource. + /// The connection details of the + /// datasource that need to be updated. This is mandataory when the + /// dataset has more than one datasource. public UpdateDatasourceConnectionRequest(DatasourceConnectionDetails connectionDetails, Datasource datasourceSelector = default(Datasource)) { ConnectionDetails = connectionDetails; @@ -38,11 +43,16 @@ public UpdateDatasourceConnectionRequest() partial void CustomInit(); /// + /// Gets or sets the target connection details of the updated + /// datasource. /// [JsonProperty(PropertyName = "connectionDetails")] public DatasourceConnectionDetails ConnectionDetails { get; set; } /// + /// Gets or sets the connection details of the datasource that need to + /// be updated. This is mandataory when the dataset has more than one + /// datasource. /// [JsonProperty(PropertyName = "datasourceSelector")] public Datasource DatasourceSelector { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/UpdateDatasourcesRequest.cs b/sdk/PowerBI.Api/Source/Models/UpdateDatasourcesRequest.cs index 1d69257f..5b5122be 100644 --- a/sdk/PowerBI.Api/Source/Models/UpdateDatasourcesRequest.cs +++ b/sdk/PowerBI.Api/Source/Models/UpdateDatasourcesRequest.cs @@ -25,7 +25,8 @@ public UpdateDatasourcesRequest() /// /// Initializes a new instance of the UpdateDatasourcesRequest class. /// - /// The connection server + /// An array of datasource connection + /// update requests public UpdateDatasourcesRequest(IList updateDetails) { UpdateDetails = updateDetails; @@ -38,7 +39,7 @@ public UpdateDatasourcesRequest(IList updateD partial void CustomInit(); /// - /// Gets or sets the connection server + /// Gets or sets an array of datasource connection update requests /// [JsonProperty(PropertyName = "updateDetails")] public IList UpdateDetails { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/WorkspaceCapacityAssignmentStatus.cs b/sdk/PowerBI.Api/Source/Models/WorkspaceCapacityAssignmentStatus.cs index 7276811f..c8ef8a5c 100644 --- a/sdk/PowerBI.Api/Source/Models/WorkspaceCapacityAssignmentStatus.cs +++ b/sdk/PowerBI.Api/Source/Models/WorkspaceCapacityAssignmentStatus.cs @@ -34,9 +34,10 @@ public WorkspaceCapacityAssignmentStatus() /// operation /// End time of workspace assignment /// operation - /// The capacity id - /// The activity id of the acctual assignment - /// operation, can be provided in case of assignment failures + /// The capacity ID + /// The activity ID of the assignment + /// operation, which can be provided in case of assignment + /// failures public WorkspaceCapacityAssignmentStatus(AssignmentStatus status, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), System.Guid? capacityId = default(System.Guid?), System.Guid? activityId = default(System.Guid?)) { Status = status; @@ -73,14 +74,14 @@ public WorkspaceCapacityAssignmentStatus() public System.DateTime? EndTime { get; set; } /// - /// Gets or sets the capacity id + /// Gets or sets the capacity ID /// [JsonProperty(PropertyName = "capacityId")] public System.Guid? CapacityId { get; set; } /// - /// Gets or sets the activity id of the acctual assignment operation, - /// can be provided in case of assignment failures + /// Gets or sets the activity ID of the assignment operation, which can + /// be provided in case of assignment failures /// [JsonProperty(PropertyName = "activityId")] public System.Guid? ActivityId { get; set; } diff --git a/sdk/PowerBI.Api/Source/Models/WorkspaceInfo.cs b/sdk/PowerBI.Api/Source/Models/WorkspaceInfo.cs index a00b19c5..16723977 100644 --- a/sdk/PowerBI.Api/Source/Models/WorkspaceInfo.cs +++ b/sdk/PowerBI.Api/Source/Models/WorkspaceInfo.cs @@ -49,7 +49,12 @@ public WorkspaceInfo() /// The dataflows associated with this /// workspace. The list of properties returned varies between APIs, /// thus you may not see them all as part of the API response. - public WorkspaceInfo(System.Guid id, string name = default(string), string description = default(string), string type = default(string), string state = default(string), string dataRetrievalState = default(string), bool? isOnDedicatedCapacity = default(bool?), string capacityId = default(string), IList reports = default(IList), IList dashboards = default(IList), IList datasets = default(IList), IList dataflows = default(IList)) + /// Users have access to the workspace, only apply + /// when user information is requested explicitly. The list is + /// retrieved for V2 workspaces but not for classic workspaces. To + /// retirve the users for classic workspace, call AAD Graph + /// APIs. + public WorkspaceInfo(System.Guid id, string name = default(string), string description = default(string), string type = default(string), string state = default(string), string dataRetrievalState = default(string), bool? isOnDedicatedCapacity = default(bool?), string capacityId = default(string), IList reports = default(IList), IList dashboards = default(IList), IList datasets = default(IList), IList dataflows = default(IList), IList users = default(IList)) { Id = id; Name = name; @@ -63,6 +68,7 @@ public WorkspaceInfo() Dashboards = dashboards; Datasets = datasets; Dataflows = dataflows; + Users = users; CustomInit(); } @@ -151,6 +157,15 @@ public WorkspaceInfo() [JsonProperty(PropertyName = "dataflows")] public IList Dataflows { get; set; } + /// + /// Gets or sets users have access to the workspace, only apply when + /// user information is requested explicitly. The list is retrieved for + /// V2 workspaces but not for classic workspaces. To retirve the users + /// for classic workspace, call AAD Graph APIs. + /// + [JsonProperty(PropertyName = "users")] + public IList Users { get; set; } + /// /// Validate the object. /// @@ -199,6 +214,16 @@ public virtual void Validate() } } } + if (Users != null) + { + foreach (var element4 in Users) + { + if (element4 != null) + { + element4.Validate(); + } + } + } } } } diff --git a/sdk/PowerBI.Api/Source/PipelinesOperations.cs b/sdk/PowerBI.Api/Source/PipelinesOperations.cs new file mode 100644 index 00000000..0cfcc5d6 --- /dev/null +++ b/sdk/PowerBI.Api/Source/PipelinesOperations.cs @@ -0,0 +1,1687 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api +{ + using Microsoft.Rest; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// PipelinesOperations operations. + /// + public partial class PipelinesOperations : IServiceOperations, IPipelinesOperations + { + /// + /// Initializes a new instance of the PipelinesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + public PipelinesOperations(PowerBIClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the PowerBIClient + /// + public PowerBIClient Client { get; private set; } + + /// + /// Returns a list of deployment pipelines the user has access to. + /// + /// + /// <br/>**Required scope**: Pipeline.Read.All or Pipeline.ReadWrite.All + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetPipelinesWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetPipelines", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/pipelines").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Returns the specified deployment pipeline. + /// + /// + /// <br/>**Required scope**: Pipeline.ReadWrite.All or Pipeline.Read.All + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The deployment pipeline ID + /// + /// + /// Expands related entities inline, receives a comma-separated list of data + /// types. Supported: stages + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetPipelineWithHttpMessagesAsync(System.Guid pipelineId, string expand = "stages", Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("pipelineId", pipelineId); + tracingParameters.Add("expand", expand); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetPipeline", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/pipelines/{pipelineId}").ToString(); + _url = _url.Replace("{pipelineId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(pipelineId, Client.SerializationSettings).Trim('"'))); + List _queryParameters = new List(); + if (expand != null) + { + _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Returns the supported items from the workspace assigned to the specified + /// deployment pipeline stage. To learn more about items that are not supported + /// in deployment pipelines, see [unsupported + /// items](https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#unsupported-items) + /// + /// + /// **Note**: To perform this operation, the user must be at least a + /// contributor on the workspace assigned to the specified stage. For more + /// information, see + /// [permissions]([https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#permissions) + /// <br/><br/>**Required scope**: Pipeline.ReadWrite.All or + /// Pipeline.Read.All <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The deployment pipeline ID + /// + /// + /// The deployment pipeline stage order. Development (0), Test (1), Production + /// (2). + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetPipelineStageArtifactsWithHttpMessagesAsync(System.Guid pipelineId, int stageOrder, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("pipelineId", pipelineId); + tracingParameters.Add("stageOrder", stageOrder); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetPipelineStageArtifacts", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/pipelines/{pipelineId}/stages/{stageOrder}/artifacts").ToString(); + _url = _url.Replace("{pipelineId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(pipelineId, Client.SerializationSettings).Trim('"'))); + _url = _url.Replace("{stageOrder}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(stageOrder, Client.SerializationSettings).Trim('"'))); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Returns a list of up to 20 last deploy operations performed on the + /// specified deployment pipeline. + /// + /// + /// <br/>**Required scope**: Pipeline.ReadWrite.All or Pipeline.Read.All + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The deployment pipeline ID + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetPipelineOperationsWithHttpMessagesAsync(System.Guid pipelineId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("pipelineId", pipelineId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetPipelineOperations", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/pipelines/{pipelineId}/operations").ToString(); + _url = _url.Replace("{pipelineId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(pipelineId, Client.SerializationSettings).Trim('"'))); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Returns the details of the specified deploy operation performed on the + /// specified deployment pipeline including the `executionPlan`. Use to track + /// the status of the deploy operation. + /// + /// + /// <br/>**Required scope**: Pipeline.ReadWrite.All or Pipeline.Read.All + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The deployment pipeline ID + /// + /// + /// The operation ID + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetPipelineOperationWithHttpMessagesAsync(System.Guid pipelineId, System.Guid operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("pipelineId", pipelineId); + tracingParameters.Add("operationId", operationId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetPipelineOperation", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/pipelines/{pipelineId}/operations/{operationId}").ToString(); + _url = _url.Replace("{pipelineId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(pipelineId, Client.SerializationSettings).Trim('"'))); + _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(operationId, Client.SerializationSettings).Trim('"'))); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deploy all supported items from the specified deployment pipeline source + /// stage. To learn more about items that are not supported in deployment + /// pipelines, see [unsupported + /// items](https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#unsupported-items) + /// + /// + /// <br/>**Note**: To perform this operation, the user must be at least a + /// member on both workpsaces. For more information, see + /// [permissions]([https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#permissions) + /// <br/><br/>**Required scope**: Pipeline.Deploy <br/>To set + /// the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app).<br/><h4>Limitations</h4><ul><li>You + /// can deploy up to 300 items per request</li></ul> + /// + /// + /// The deployment pipeline ID + /// + /// + /// The deploy request + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeployAllWithHttpMessagesAsync(System.Guid pipelineId, DeployAllRequest deployRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (deployRequest == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "deployRequest"); + } + if (deployRequest != null) + { + deployRequest.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("pipelineId", pipelineId); + tracingParameters.Add("deployRequest", deployRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeployAll", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/pipelines/{pipelineId}/deployAll").ToString(); + _url = _url.Replace("{pipelineId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(pipelineId, Client.SerializationSettings).Trim('"'))); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(deployRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(deployRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 202) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deploy the specified items from the specified deployment pipeline source + /// stage. + /// + /// + /// **Note**: To perform this operation, the user must be at least a member on + /// both workpsaces. For more information, see + /// [permissions]([https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#permissions) + /// <br/><br/>**Required scope**: Pipeline.Deploy <br/>To set + /// the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app).<br/><h4>Limitations</h4><ul><li>You + /// can deploy up to 300 items per request</li></ul> + /// + /// + /// The deployment pipeline ID + /// + /// + /// The selective deploy request + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> SelectiveDeployWithHttpMessagesAsync(System.Guid pipelineId, SelectiveDeployRequest deployRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (deployRequest == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "deployRequest"); + } + if (deployRequest != null) + { + deployRequest.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("pipelineId", pipelineId); + tracingParameters.Add("deployRequest", deployRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "SelectiveDeploy", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/pipelines/{pipelineId}/deploy").ToString(); + _url = _url.Replace("{pipelineId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(pipelineId, Client.SerializationSettings).Trim('"'))); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(deployRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(deployRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 202) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Returns a list of deployment pipelines for the organization. + /// + /// + /// **Note:** To call this API the user must have administrator rights. + /// Alternatively, authenticate using a service principal. <br/>This API + /// allows a maximum of 200 requests per hour. <br/><br/>**Required + /// scope**: Tenant.Read.All or Tenant.ReadWrite.All. + /// + /// + /// Expands related entities inline, receives a comma-separated list of data + /// types. Supported: users, stages. + /// + /// + /// Filters the results based on a boolean condition. + /// + /// + /// Returns only the first n results. This parameter must be in the range of + /// 1-5000. + /// + /// + /// Skips the first n results. Use with top to fetch results beyond the first + /// 5000. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetPipelinesAsAdminWithHttpMessagesAsync(string expand = default(string), string filter = default(string), int? top = default(int?), int? skip = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (top > 5000) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "top", 5000); + } + if (top < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "top", 1); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("expand", expand); + tracingParameters.Add("filter", filter); + tracingParameters.Add("top", top); + tracingParameters.Add("skip", skip); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetPipelinesAsAdmin", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/admin/pipelines").ToString(); + List _queryParameters = new List(); + if (expand != null) + { + _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand))); + } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter))); + } + if (top != null) + { + _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"')))); + } + if (skip != null) + { + _queryParameters.Add(string.Format("$skip={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(skip, Client.SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Returns a list of users that have access to a specified deployment + /// pipeline. + /// + /// + /// **Note:** To call this API the user must have administrator rights. + /// Alternatively, authenticate using a service principal. <br/>This API + /// allows a maximum of 200 requests per hour. <br/><br/>**Required + /// scope**: Tenant.Read.All or Tenant.ReadWrite.All. + /// + /// + /// The deployment pipeline ID + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetPipelineUsersAsAdminWithHttpMessagesAsync(System.Guid pipelineId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("pipelineId", pipelineId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetPipelineUsersAsAdmin", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/admin/pipelines/{pipelineId}/users").ToString(); + _url = _url.Replace("{pipelineId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(pipelineId, Client.SerializationSettings).Trim('"'))); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Grants user permissions to a specified deployment pipeline. + /// + /// + /// **Note:** To call this API the user must have administrator rights. + /// <br/>This API allows a maximum of 200 requests per hour. + /// <br/><br/>**Required scope**: + /// Tenant.ReadWrite.All.<br/><br/>**Limitations:** This API + /// doesn't support service principals. You cannot update service principal's + /// permissions. + /// + /// + /// The deployment pipeline ID + /// + /// + /// Details of user access right + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task UpdateUserAsAdminWithHttpMessagesAsync(System.Guid pipelineId, PipelineUser userDetails, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (userDetails == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "userDetails"); + } + if (userDetails != null) + { + userDetails.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("pipelineId", pipelineId); + tracingParameters.Add("userDetails", userDetails); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "UpdateUserAsAdmin", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/admin/pipelines/{pipelineId}/users").ToString(); + _url = _url.Replace("{pipelineId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(pipelineId, Client.SerializationSettings).Trim('"'))); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(userDetails != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(userDetails, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Remove user permissions from a specified deployment pipeline. + /// + /// + /// **Note:** To call this API the user must have administrator rights. + /// <br/>This API allows a maximum of 200 requests per hour. + /// <br/><br/>**Required scope**: + /// Tenant.ReadWrite.All.<br/><br/>**Limitations:** This API + /// doesn't support service principals. You cannot delete service principal's + /// permissions. + /// + /// + /// The deployment pipeline ID + /// + /// + /// For Principal type 'User' provide UPN , otherwise provide [Object + /// ID](/power-bi/developer/embedded/embedded-troubleshoot#what-is-the-difference-between-application-object-id-and-principal-object-id) + /// of the principal + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteUserAsAdminWithHttpMessagesAsync(System.Guid pipelineId, string identifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (identifier == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "identifier"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("pipelineId", pipelineId); + tracingParameters.Add("identifier", identifier); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteUserAsAdmin", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/admin/pipelines/{pipelineId}/users/{identifier}").ToString(); + _url = _url.Replace("{pipelineId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(pipelineId, Client.SerializationSettings).Trim('"'))); + _url = _url.Replace("{identifier}", System.Uri.EscapeDataString(identifier)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/PowerBI.Api/Source/PipelinesOperationsExtensions.cs b/sdk/PowerBI.Api/Source/PipelinesOperationsExtensions.cs new file mode 100644 index 00000000..6ced59b3 --- /dev/null +++ b/sdk/PowerBI.Api/Source/PipelinesOperationsExtensions.cs @@ -0,0 +1,627 @@ +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.PowerBI.Api +{ + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for PipelinesOperations. + /// + public static partial class PipelinesOperationsExtensions + { + /// + /// Returns a list of deployment pipelines the user has access to. + /// + /// + /// <br/>**Required scope**: Pipeline.Read.All or Pipeline.ReadWrite.All + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + public static Pipelines GetPipelines(this IPipelinesOperations operations) + { + return operations.GetPipelinesAsync().GetAwaiter().GetResult(); + } + + /// + /// Returns a list of deployment pipelines the user has access to. + /// + /// + /// <br/>**Required scope**: Pipeline.Read.All or Pipeline.ReadWrite.All + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetPipelinesAsync(this IPipelinesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetPipelinesWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Returns the specified deployment pipeline. + /// + /// + /// <br/>**Required scope**: Pipeline.ReadWrite.All or Pipeline.Read.All + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The deployment pipeline ID + /// + /// + /// Expands related entities inline, receives a comma-separated list of data + /// types. Supported: stages + /// + public static Pipeline GetPipeline(this IPipelinesOperations operations, System.Guid pipelineId, string expand = "stages") + { + return operations.GetPipelineAsync(pipelineId, expand).GetAwaiter().GetResult(); + } + + /// + /// Returns the specified deployment pipeline. + /// + /// + /// <br/>**Required scope**: Pipeline.ReadWrite.All or Pipeline.Read.All + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The deployment pipeline ID + /// + /// + /// Expands related entities inline, receives a comma-separated list of data + /// types. Supported: stages + /// + /// + /// The cancellation token. + /// + public static async Task GetPipelineAsync(this IPipelinesOperations operations, System.Guid pipelineId, string expand = "stages", CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetPipelineWithHttpMessagesAsync(pipelineId, expand, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Returns the supported items from the workspace assigned to the specified + /// deployment pipeline stage. To learn more about items that are not supported + /// in deployment pipelines, see [unsupported + /// items](https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#unsupported-items) + /// + /// + /// **Note**: To perform this operation, the user must be at least a + /// contributor on the workspace assigned to the specified stage. For more + /// information, see + /// [permissions]([https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#permissions) + /// <br/><br/>**Required scope**: Pipeline.ReadWrite.All or + /// Pipeline.Read.All <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The deployment pipeline ID + /// + /// + /// The deployment pipeline stage order. Development (0), Test (1), Production + /// (2). + /// + public static PipelineStageArtifacts GetPipelineStageArtifacts(this IPipelinesOperations operations, System.Guid pipelineId, int stageOrder) + { + return operations.GetPipelineStageArtifactsAsync(pipelineId, stageOrder).GetAwaiter().GetResult(); + } + + /// + /// Returns the supported items from the workspace assigned to the specified + /// deployment pipeline stage. To learn more about items that are not supported + /// in deployment pipelines, see [unsupported + /// items](https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#unsupported-items) + /// + /// + /// **Note**: To perform this operation, the user must be at least a + /// contributor on the workspace assigned to the specified stage. For more + /// information, see + /// [permissions]([https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#permissions) + /// <br/><br/>**Required scope**: Pipeline.ReadWrite.All or + /// Pipeline.Read.All <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The deployment pipeline ID + /// + /// + /// The deployment pipeline stage order. Development (0), Test (1), Production + /// (2). + /// + /// + /// The cancellation token. + /// + public static async Task GetPipelineStageArtifactsAsync(this IPipelinesOperations operations, System.Guid pipelineId, int stageOrder, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetPipelineStageArtifactsWithHttpMessagesAsync(pipelineId, stageOrder, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Returns a list of up to 20 last deploy operations performed on the + /// specified deployment pipeline. + /// + /// + /// <br/>**Required scope**: Pipeline.ReadWrite.All or Pipeline.Read.All + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The deployment pipeline ID + /// + public static PipelineOperations GetPipelineOperations(this IPipelinesOperations operations, System.Guid pipelineId) + { + return operations.GetPipelineOperationsAsync(pipelineId).GetAwaiter().GetResult(); + } + + /// + /// Returns a list of up to 20 last deploy operations performed on the + /// specified deployment pipeline. + /// + /// + /// <br/>**Required scope**: Pipeline.ReadWrite.All or Pipeline.Read.All + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The deployment pipeline ID + /// + /// + /// The cancellation token. + /// + public static async Task GetPipelineOperationsAsync(this IPipelinesOperations operations, System.Guid pipelineId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetPipelineOperationsWithHttpMessagesAsync(pipelineId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Returns the details of the specified deploy operation performed on the + /// specified deployment pipeline including the `executionPlan`. Use to track + /// the status of the deploy operation. + /// + /// + /// <br/>**Required scope**: Pipeline.ReadWrite.All or Pipeline.Read.All + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The deployment pipeline ID + /// + /// + /// The operation ID + /// + public static PipelineOperation GetPipelineOperation(this IPipelinesOperations operations, System.Guid pipelineId, System.Guid operationId) + { + return operations.GetPipelineOperationAsync(pipelineId, operationId).GetAwaiter().GetResult(); + } + + /// + /// Returns the details of the specified deploy operation performed on the + /// specified deployment pipeline including the `executionPlan`. Use to track + /// the status of the deploy operation. + /// + /// + /// <br/>**Required scope**: Pipeline.ReadWrite.All or Pipeline.Read.All + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The deployment pipeline ID + /// + /// + /// The operation ID + /// + /// + /// The cancellation token. + /// + public static async Task GetPipelineOperationAsync(this IPipelinesOperations operations, System.Guid pipelineId, System.Guid operationId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetPipelineOperationWithHttpMessagesAsync(pipelineId, operationId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deploy all supported items from the specified deployment pipeline source + /// stage. To learn more about items that are not supported in deployment + /// pipelines, see [unsupported + /// items](https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#unsupported-items) + /// + /// + /// <br/>**Note**: To perform this operation, the user must be at least a + /// member on both workpsaces. For more information, see + /// [permissions]([https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#permissions) + /// <br/><br/>**Required scope**: Pipeline.Deploy <br/>To set + /// the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app).<br/><h4>Limitations</h4><ul><li>You + /// can deploy up to 300 items per request</li></ul> + /// + /// + /// The operations group for this extension method. + /// + /// + /// The deployment pipeline ID + /// + /// + /// The deploy request + /// + public static PipelineOperation DeployAll(this IPipelinesOperations operations, System.Guid pipelineId, DeployAllRequest deployRequest) + { + return operations.DeployAllAsync(pipelineId, deployRequest).GetAwaiter().GetResult(); + } + + /// + /// Deploy all supported items from the specified deployment pipeline source + /// stage. To learn more about items that are not supported in deployment + /// pipelines, see [unsupported + /// items](https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#unsupported-items) + /// + /// + /// <br/>**Note**: To perform this operation, the user must be at least a + /// member on both workpsaces. For more information, see + /// [permissions]([https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#permissions) + /// <br/><br/>**Required scope**: Pipeline.Deploy <br/>To set + /// the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app).<br/><h4>Limitations</h4><ul><li>You + /// can deploy up to 300 items per request</li></ul> + /// + /// + /// The operations group for this extension method. + /// + /// + /// The deployment pipeline ID + /// + /// + /// The deploy request + /// + /// + /// The cancellation token. + /// + public static async Task DeployAllAsync(this IPipelinesOperations operations, System.Guid pipelineId, DeployAllRequest deployRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeployAllWithHttpMessagesAsync(pipelineId, deployRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deploy the specified items from the specified deployment pipeline source + /// stage. + /// + /// + /// **Note**: To perform this operation, the user must be at least a member on + /// both workpsaces. For more information, see + /// [permissions]([https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#permissions) + /// <br/><br/>**Required scope**: Pipeline.Deploy <br/>To set + /// the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app).<br/><h4>Limitations</h4><ul><li>You + /// can deploy up to 300 items per request</li></ul> + /// + /// + /// The operations group for this extension method. + /// + /// + /// The deployment pipeline ID + /// + /// + /// The selective deploy request + /// + public static PipelineOperation SelectiveDeploy(this IPipelinesOperations operations, System.Guid pipelineId, SelectiveDeployRequest deployRequest) + { + return operations.SelectiveDeployAsync(pipelineId, deployRequest).GetAwaiter().GetResult(); + } + + /// + /// Deploy the specified items from the specified deployment pipeline source + /// stage. + /// + /// + /// **Note**: To perform this operation, the user must be at least a member on + /// both workpsaces. For more information, see + /// [permissions]([https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#permissions) + /// <br/><br/>**Required scope**: Pipeline.Deploy <br/>To set + /// the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app).<br/><h4>Limitations</h4><ul><li>You + /// can deploy up to 300 items per request</li></ul> + /// + /// + /// The operations group for this extension method. + /// + /// + /// The deployment pipeline ID + /// + /// + /// The selective deploy request + /// + /// + /// The cancellation token. + /// + public static async Task SelectiveDeployAsync(this IPipelinesOperations operations, System.Guid pipelineId, SelectiveDeployRequest deployRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.SelectiveDeployWithHttpMessagesAsync(pipelineId, deployRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Returns a list of deployment pipelines for the organization. + /// + /// + /// **Note:** To call this API the user must have administrator rights. + /// Alternatively, authenticate using a service principal. <br/>This API + /// allows a maximum of 200 requests per hour. <br/><br/>**Required + /// scope**: Tenant.Read.All or Tenant.ReadWrite.All. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Expands related entities inline, receives a comma-separated list of data + /// types. Supported: users, stages. + /// + /// + /// Filters the results based on a boolean condition. + /// + /// + /// Returns only the first n results. This parameter must be in the range of + /// 1-5000. + /// + /// + /// Skips the first n results. Use with top to fetch results beyond the first + /// 5000. + /// + public static Pipelines GetPipelinesAsAdmin(this IPipelinesOperations operations, string expand = default(string), string filter = default(string), int? top = default(int?), int? skip = default(int?)) + { + return operations.GetPipelinesAsAdminAsync(expand, filter, top, skip).GetAwaiter().GetResult(); + } + + /// + /// Returns a list of deployment pipelines for the organization. + /// + /// + /// **Note:** To call this API the user must have administrator rights. + /// Alternatively, authenticate using a service principal. <br/>This API + /// allows a maximum of 200 requests per hour. <br/><br/>**Required + /// scope**: Tenant.Read.All or Tenant.ReadWrite.All. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Expands related entities inline, receives a comma-separated list of data + /// types. Supported: users, stages. + /// + /// + /// Filters the results based on a boolean condition. + /// + /// + /// Returns only the first n results. This parameter must be in the range of + /// 1-5000. + /// + /// + /// Skips the first n results. Use with top to fetch results beyond the first + /// 5000. + /// + /// + /// The cancellation token. + /// + public static async Task GetPipelinesAsAdminAsync(this IPipelinesOperations 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.GetPipelinesAsAdminWithHttpMessagesAsync(expand, filter, top, skip, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Returns a list of users that have access to a specified deployment + /// pipeline. + /// + /// + /// **Note:** To call this API the user must have administrator rights. + /// Alternatively, authenticate using a service principal. <br/>This API + /// allows a maximum of 200 requests per hour. <br/><br/>**Required + /// scope**: Tenant.Read.All or Tenant.ReadWrite.All. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The deployment pipeline ID + /// + public static PipelineUsers GetPipelineUsersAsAdmin(this IPipelinesOperations operations, System.Guid pipelineId) + { + return operations.GetPipelineUsersAsAdminAsync(pipelineId).GetAwaiter().GetResult(); + } + + /// + /// Returns a list of users that have access to a specified deployment + /// pipeline. + /// + /// + /// **Note:** To call this API the user must have administrator rights. + /// Alternatively, authenticate using a service principal. <br/>This API + /// allows a maximum of 200 requests per hour. <br/><br/>**Required + /// scope**: Tenant.Read.All or Tenant.ReadWrite.All. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The deployment pipeline ID + /// + /// + /// The cancellation token. + /// + public static async Task GetPipelineUsersAsAdminAsync(this IPipelinesOperations operations, System.Guid pipelineId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetPipelineUsersAsAdminWithHttpMessagesAsync(pipelineId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Grants user permissions to a specified deployment pipeline. + /// + /// + /// **Note:** To call this API the user must have administrator rights. + /// <br/>This API allows a maximum of 200 requests per hour. + /// <br/><br/>**Required scope**: + /// Tenant.ReadWrite.All.<br/><br/>**Limitations:** This API + /// doesn't support service principals. You cannot update service principal's + /// permissions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The deployment pipeline ID + /// + /// + /// Details of user access right + /// + public static void UpdateUserAsAdmin(this IPipelinesOperations operations, System.Guid pipelineId, PipelineUser userDetails) + { + operations.UpdateUserAsAdminAsync(pipelineId, userDetails).GetAwaiter().GetResult(); + } + + /// + /// Grants user permissions to a specified deployment pipeline. + /// + /// + /// **Note:** To call this API the user must have administrator rights. + /// <br/>This API allows a maximum of 200 requests per hour. + /// <br/><br/>**Required scope**: + /// Tenant.ReadWrite.All.<br/><br/>**Limitations:** This API + /// doesn't support service principals. You cannot update service principal's + /// permissions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The deployment pipeline ID + /// + /// + /// Details of user access right + /// + /// + /// The cancellation token. + /// + public static async Task UpdateUserAsAdminAsync(this IPipelinesOperations operations, System.Guid pipelineId, PipelineUser userDetails, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpdateUserAsAdminWithHttpMessagesAsync(pipelineId, userDetails, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Remove user permissions from a specified deployment pipeline. + /// + /// + /// **Note:** To call this API the user must have administrator rights. + /// <br/>This API allows a maximum of 200 requests per hour. + /// <br/><br/>**Required scope**: + /// Tenant.ReadWrite.All.<br/><br/>**Limitations:** This API + /// doesn't support service principals. You cannot delete service principal's + /// permissions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The deployment pipeline ID + /// + /// + /// For Principal type 'User' provide UPN , otherwise provide [Object + /// ID](/power-bi/developer/embedded/embedded-troubleshoot#what-is-the-difference-between-application-object-id-and-principal-object-id) + /// of the principal + /// + public static void DeleteUserAsAdmin(this IPipelinesOperations operations, System.Guid pipelineId, string identifier) + { + operations.DeleteUserAsAdminAsync(pipelineId, identifier).GetAwaiter().GetResult(); + } + + /// + /// Remove user permissions from a specified deployment pipeline. + /// + /// + /// **Note:** To call this API the user must have administrator rights. + /// <br/>This API allows a maximum of 200 requests per hour. + /// <br/><br/>**Required scope**: + /// Tenant.ReadWrite.All.<br/><br/>**Limitations:** This API + /// doesn't support service principals. You cannot delete service principal's + /// permissions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The deployment pipeline ID + /// + /// + /// For Principal type 'User' provide UPN , otherwise provide [Object + /// ID](/power-bi/developer/embedded/embedded-troubleshoot#what-is-the-difference-between-application-object-id-and-principal-object-id) + /// of the principal + /// + /// + /// The cancellation token. + /// + public static async Task DeleteUserAsAdminAsync(this IPipelinesOperations operations, System.Guid pipelineId, string identifier, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteUserAsAdminWithHttpMessagesAsync(pipelineId, identifier, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/sdk/PowerBI.Api/Source/PowerBIClient.cs b/sdk/PowerBI.Api/Source/PowerBIClient.cs index 2077efdb..43353d2a 100644 --- a/sdk/PowerBI.Api/Source/PowerBIClient.cs +++ b/sdk/PowerBI.Api/Source/PowerBIClient.cs @@ -97,6 +97,11 @@ public partial class PowerBIClient : ServiceClient, IPowerBIClien /// public virtual IAvailableFeaturesOperations AvailableFeatures { get; private set; } + /// + /// Gets the IPipelinesOperations. + /// + public virtual IPipelinesOperations Pipelines { get; private set; } + /// /// Gets the IDataflowStorageAccountsOperations. /// @@ -340,6 +345,7 @@ private void Initialize() Groups = new GroupsOperations(this); Capacities = new CapacitiesOperations(this); AvailableFeatures = new AvailableFeaturesOperations(this); + Pipelines = new PipelinesOperations(this); DataflowStorageAccounts = new DataflowStorageAccountsOperations(this); WorkspaceInfo = new WorkspaceInfoOperations(this); Admin = new Admin(this); diff --git a/sdk/PowerBI.Api/Source/ReportsOperations.cs b/sdk/PowerBI.Api/Source/ReportsOperations.cs index be30ace8..403a07f0 100644 --- a/sdk/PowerBI.Api/Source/ReportsOperations.cs +++ b/sdk/PowerBI.Api/Source/ReportsOperations.cs @@ -188,7 +188,7 @@ public ReportsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The report id + /// The report ID /// /// /// Headers that will be added to request. @@ -324,7 +324,7 @@ public ReportsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The report id + /// The report ID /// /// /// Headers that will be added to request. @@ -445,7 +445,7 @@ public ReportsOperations(PowerBIClient client) /// dataset (if provided) - Build permissions. /// /// - /// The report id + /// The report ID /// /// /// Clone report parameters @@ -600,8 +600,11 @@ public ReportsOperations(PowerBIClient client) /// Exports the specified report from **"My Workspace"** to a .pbix file. /// /// - /// <br/>**Required scope**: Report.ReadWrite.All or Report.Read.All - /// <br/>To set the permissions scope, see [Register an + /// <br/>**Note**: As a [workaround for fixing timeout + /// issues](/power-bi/developer/embedded/embedded-troubleshoot#how-to-fix-timeout-exceptions-when-using-import-and-export-apis), + /// you can set `preferClientRouting` to true.<br/><br/>**Required + /// scope**: Report.ReadWrite.All or Report.Read.All <br/>To set the + /// permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// <h2>Restrictions</h2>Export of a report with [Power BI service /// live @@ -610,7 +613,7 @@ public ReportsOperations(PowerBIClient client) /// not supported.<br/> /// /// - /// The report id + /// The report ID /// /// /// Headers that will be added to request. @@ -734,7 +737,7 @@ public ReportsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The report id + /// The report ID /// /// /// UpdateReportContent parameters @@ -900,7 +903,7 @@ public ReportsOperations(PowerBIClient client) /// dataset - Build permissions. /// /// - /// The report id + /// The report ID /// /// /// Rebind report parameters @@ -1040,7 +1043,7 @@ public ReportsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The report id + /// The report ID /// /// /// Headers that will be added to request. @@ -1177,7 +1180,7 @@ public ReportsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The report id + /// The report ID /// /// /// The page name @@ -1329,7 +1332,7 @@ public ReportsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The report id + /// The report ID /// /// /// Headers that will be added to request. @@ -1472,7 +1475,7 @@ public ReportsOperations(PowerBIClient client) /// supported</li></ul> /// /// - /// The report id + /// The report ID /// /// /// @@ -1615,7 +1618,7 @@ public ReportsOperations(PowerBIClient client) /// Premium Per User (PPU) is not supported. /// /// - /// The report id + /// The report ID /// /// /// Export to file request parameters @@ -1775,10 +1778,10 @@ public ReportsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The report id + /// The report ID /// /// - /// The export id + /// The export ID /// /// /// Headers that will be added to request. @@ -1945,10 +1948,10 @@ public ReportsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The report id + /// The report ID /// /// - /// The export id + /// The export ID /// /// /// Headers that will be added to request. @@ -2085,7 +2088,7 @@ public ReportsOperations(PowerBIClient client) /// response for paginated reports, the dataset ID value isn’t displayed. /// /// - /// The workspace id + /// The workspace ID /// /// /// Headers that will be added to request. @@ -2221,10 +2224,10 @@ public ReportsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// Headers that will be added to request. @@ -2362,10 +2365,10 @@ public ReportsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// Headers that will be added to request. @@ -2488,10 +2491,10 @@ public ReportsOperations(PowerBIClient client) /// dataset (if provided) - Build permissions /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// Clone report parameters @@ -2648,8 +2651,11 @@ public ReportsOperations(PowerBIClient client) /// Exports the specified report from the specified workspace to a .pbix file. /// /// - /// <br/>**Required scope**: Report.ReadWrite.All or Report.Read.All - /// <br/>To set the permissions scope, see [Register an + /// <br/>**Note**: As a [workaround for fixing timeout + /// issues](/power-bi/developer/embedded/embedded-troubleshoot#how-to-fix-timeout-exceptions-when-using-import-and-export-apis), + /// you can set `preferClientRouting` to true.<br/><br/>**Required + /// scope**: Report.ReadWrite.All or Report.Read.All <br/>To set the + /// permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// <h2>Restrictions</h2>Export of a report with [Power BI service /// live @@ -2658,10 +2664,10 @@ public ReportsOperations(PowerBIClient client) /// not supported.<br/> /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// Headers that will be added to request. @@ -2787,10 +2793,10 @@ public ReportsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// UpdateReportContent parameters @@ -2959,10 +2965,10 @@ public ReportsOperations(PowerBIClient client) /// dataset - Build permissions /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// Rebind report parameters @@ -3104,10 +3110,10 @@ public ReportsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// Headers that will be added to request. @@ -3246,10 +3252,10 @@ public ReportsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// The page name @@ -3403,7 +3409,7 @@ public ReportsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// @@ -3550,10 +3556,10 @@ public ReportsOperations(PowerBIClient client) /// supported</li></ul> /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// @@ -3698,10 +3704,10 @@ public ReportsOperations(PowerBIClient client) /// Premium Per User (PPU) is not supported. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// Export to file request parameters @@ -3863,13 +3869,13 @@ public ReportsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// - /// The export id + /// The export ID /// /// /// Headers that will be added to request. @@ -4038,13 +4044,13 @@ public ReportsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// - /// The export id + /// The export ID /// /// /// Headers that will be added to request. @@ -4197,7 +4203,7 @@ public ReportsOperations(PowerBIClient client) /// after a [Rebind](/rest/api/power-bi/reports/RebindReport).<br/> /// /// - /// The workspace id + /// The workspace ID /// /// /// Generate token parameters @@ -4371,10 +4377,10 @@ public ReportsOperations(PowerBIClient client) /// after a [Rebind](/rest/api/power-bi/reports/RebindReport).<br/> /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// Generate token parameters @@ -4536,7 +4542,7 @@ public ReportsOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// - /// The workspace id + /// The workspace ID /// /// /// Filters the results, based on a boolean condition @@ -4856,6 +4862,146 @@ public ReportsOperations(PowerBIClient client) return _result; } + /// + /// Returns a list of users that have access to the specified report (Preview). + /// + /// + /// **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/>Delegated permissions + /// are supported. <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The report ID + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetReportUsersAsAdminWithHttpMessagesAsync(System.Guid reportId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("reportId", reportId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetReportUsersAsAdmin", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/admin/reports/{reportId}/users").ToString(); + _url = _url.Replace("{reportId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(reportId, Client.SerializationSettings).Trim('"'))); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + /// /// Transfers ownership over the specified paginated report datasources to the /// current authorized user. @@ -4867,10 +5013,10 @@ public ReportsOperations(PowerBIClient client) /// report datasources supports only paginated reports</li> /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// Headers that will be added to request. diff --git a/sdk/PowerBI.Api/Source/ReportsOperationsExtensions.cs b/sdk/PowerBI.Api/Source/ReportsOperationsExtensions.cs index a0e97e6a..a2be8e4c 100644 --- a/sdk/PowerBI.Api/Source/ReportsOperationsExtensions.cs +++ b/sdk/PowerBI.Api/Source/ReportsOperationsExtensions.cs @@ -70,7 +70,7 @@ public static Reports GetReports(this IReportsOperations operations) /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// public static Report GetReport(this IReportsOperations operations, System.Guid reportId) { @@ -89,7 +89,7 @@ public static Report GetReport(this IReportsOperations operations, System.Guid r /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// /// /// The cancellation token. @@ -114,7 +114,7 @@ public static Report GetReport(this IReportsOperations operations, System.Guid r /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// public static void DeleteReport(this IReportsOperations operations, System.Guid reportId) { @@ -133,7 +133,7 @@ public static void DeleteReport(this IReportsOperations operations, System.Guid /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// /// /// The cancellation token. @@ -161,7 +161,7 @@ public static void DeleteReport(this IReportsOperations operations, System.Guid /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// /// /// Clone report parameters @@ -189,7 +189,7 @@ public static Report CloneReport(this IReportsOperations operations, System.Guid /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// /// /// Clone report parameters @@ -209,8 +209,11 @@ public static Report CloneReport(this IReportsOperations operations, System.Guid /// Exports the specified report from **"My Workspace"** to a .pbix file. /// /// - /// <br/>**Required scope**: Report.ReadWrite.All or Report.Read.All - /// <br/>To set the permissions scope, see [Register an + /// <br/>**Note**: As a [workaround for fixing timeout + /// issues](/power-bi/developer/embedded/embedded-troubleshoot#how-to-fix-timeout-exceptions-when-using-import-and-export-apis), + /// you can set `preferClientRouting` to true.<br/><br/>**Required + /// scope**: Report.ReadWrite.All or Report.Read.All <br/>To set the + /// permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// <h2>Restrictions</h2>Export of a report with [Power BI service /// live @@ -222,7 +225,7 @@ public static Report CloneReport(this IReportsOperations operations, System.Guid /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// public static Stream ExportReport(this IReportsOperations operations, System.Guid reportId) { @@ -233,8 +236,11 @@ public static Stream ExportReport(this IReportsOperations operations, System.Gui /// Exports the specified report from **"My Workspace"** to a .pbix file. /// /// - /// <br/>**Required scope**: Report.ReadWrite.All or Report.Read.All - /// <br/>To set the permissions scope, see [Register an + /// <br/>**Note**: As a [workaround for fixing timeout + /// issues](/power-bi/developer/embedded/embedded-troubleshoot#how-to-fix-timeout-exceptions-when-using-import-and-export-apis), + /// you can set `preferClientRouting` to true.<br/><br/>**Required + /// scope**: Report.ReadWrite.All or Report.Read.All <br/>To set the + /// permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// <h2>Restrictions</h2>Export of a report with [Power BI service /// live @@ -246,7 +252,7 @@ public static Stream ExportReport(this IReportsOperations operations, System.Gui /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// /// /// The cancellation token. @@ -271,7 +277,7 @@ public static Stream ExportReport(this IReportsOperations operations, System.Gui /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// /// /// UpdateReportContent parameters @@ -294,7 +300,7 @@ public static Report UpdateReportContent(this IReportsOperations operations, Sys /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// /// /// UpdateReportContent parameters @@ -328,7 +334,7 @@ public static Report UpdateReportContent(this IReportsOperations operations, Sys /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// /// /// Rebind report parameters @@ -356,7 +362,7 @@ public static void RebindReport(this IReportsOperations operations, System.Guid /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// /// /// Rebind report parameters @@ -382,7 +388,7 @@ public static void RebindReport(this IReportsOperations operations, System.Guid /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// public static Pages GetPages(this IReportsOperations operations, System.Guid reportId) { @@ -402,7 +408,7 @@ public static Pages GetPages(this IReportsOperations operations, System.Guid rep /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// /// /// The cancellation token. @@ -428,7 +434,7 @@ public static Pages GetPages(this IReportsOperations operations, System.Guid rep /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// /// /// The page name @@ -451,7 +457,7 @@ public static Page GetPage(this IReportsOperations operations, System.Guid repor /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// /// /// The page name @@ -480,7 +486,7 @@ public static Page GetPage(this IReportsOperations operations, System.Guid repor /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// public static Datasources GetDatasources(this IReportsOperations operations, System.Guid reportId) { @@ -500,7 +506,7 @@ public static Datasources GetDatasources(this IReportsOperations operations, Sys /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// /// /// The cancellation token. @@ -532,7 +538,7 @@ public static Datasources GetDatasources(this IReportsOperations operations, Sys /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// /// /// @@ -560,7 +566,7 @@ public static void UpdateDatasources(this IReportsOperations operations, System. /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// /// /// @@ -589,7 +595,7 @@ public static void UpdateDatasources(this IReportsOperations operations, System. /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// /// /// Export to file request parameters @@ -616,7 +622,7 @@ public static Export ExportToFile(this IReportsOperations operations, System.Gui /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// /// /// Export to file request parameters @@ -644,10 +650,10 @@ public static Export ExportToFile(this IReportsOperations operations, System.Gui /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// /// - /// The export id + /// The export ID /// public static Export GetExportToFileStatus(this IReportsOperations operations, System.Guid reportId, string exportId) { @@ -666,10 +672,10 @@ public static Export GetExportToFileStatus(this IReportsOperations operations, S /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// /// - /// The export id + /// The export ID /// /// /// The cancellation token. @@ -695,10 +701,10 @@ public static Export GetExportToFileStatus(this IReportsOperations operations, S /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// /// - /// The export id + /// The export ID /// public static Stream GetFileOfExportToFile(this IReportsOperations operations, System.Guid reportId, string exportId) { @@ -718,10 +724,10 @@ public static Stream GetFileOfExportToFile(this IReportsOperations operations, S /// The operations group for this extension method. /// /// - /// The report id + /// The report ID /// /// - /// The export id + /// The export ID /// /// /// The cancellation token. @@ -747,7 +753,7 @@ public static Stream GetFileOfExportToFile(this IReportsOperations operations, S /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// public static Reports GetReportsInGroup(this IReportsOperations operations, System.Guid groupId) { @@ -768,7 +774,7 @@ public static Reports GetReportsInGroup(this IReportsOperations operations, Syst /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// The cancellation token. @@ -793,10 +799,10 @@ public static Reports GetReportsInGroup(this IReportsOperations operations, Syst /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// public static Report GetReportInGroup(this IReportsOperations operations, System.Guid groupId, System.Guid reportId) { @@ -815,10 +821,10 @@ public static Report GetReportInGroup(this IReportsOperations operations, System /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// The cancellation token. @@ -843,10 +849,10 @@ public static Report GetReportInGroup(this IReportsOperations operations, System /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// public static void DeleteReportInGroup(this IReportsOperations operations, System.Guid groupId, System.Guid reportId) { @@ -865,10 +871,10 @@ public static void DeleteReportInGroup(this IReportsOperations operations, Syste /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// The cancellation token. @@ -896,10 +902,10 @@ public static void DeleteReportInGroup(this IReportsOperations operations, Syste /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// Clone report parameters @@ -927,10 +933,10 @@ public static Report CloneReportInGroup(this IReportsOperations operations, Syst /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// Clone report parameters @@ -950,8 +956,11 @@ public static Report CloneReportInGroup(this IReportsOperations operations, Syst /// Exports the specified report from the specified workspace to a .pbix file. /// /// - /// <br/>**Required scope**: Report.ReadWrite.All or Report.Read.All - /// <br/>To set the permissions scope, see [Register an + /// <br/>**Note**: As a [workaround for fixing timeout + /// issues](/power-bi/developer/embedded/embedded-troubleshoot#how-to-fix-timeout-exceptions-when-using-import-and-export-apis), + /// you can set `preferClientRouting` to true.<br/><br/>**Required + /// scope**: Report.ReadWrite.All or Report.Read.All <br/>To set the + /// permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// <h2>Restrictions</h2>Export of a report with [Power BI service /// live @@ -963,10 +972,10 @@ public static Report CloneReportInGroup(this IReportsOperations operations, Syst /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// public static Stream ExportReportInGroup(this IReportsOperations operations, System.Guid groupId, System.Guid reportId) { @@ -977,8 +986,11 @@ public static Stream ExportReportInGroup(this IReportsOperations operations, Sys /// Exports the specified report from the specified workspace to a .pbix file. /// /// - /// <br/>**Required scope**: Report.ReadWrite.All or Report.Read.All - /// <br/>To set the permissions scope, see [Register an + /// <br/>**Note**: As a [workaround for fixing timeout + /// issues](/power-bi/developer/embedded/embedded-troubleshoot#how-to-fix-timeout-exceptions-when-using-import-and-export-apis), + /// you can set `preferClientRouting` to true.<br/><br/>**Required + /// scope**: Report.ReadWrite.All or Report.Read.All <br/>To set the + /// permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// <h2>Restrictions</h2>Export of a report with [Power BI service /// live @@ -990,10 +1002,10 @@ public static Stream ExportReportInGroup(this IReportsOperations operations, Sys /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// The cancellation token. @@ -1018,10 +1030,10 @@ public static Stream ExportReportInGroup(this IReportsOperations operations, Sys /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// UpdateReportContent parameters @@ -1044,10 +1056,10 @@ public static Report UpdateReportContentInGroup(this IReportsOperations operatio /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// UpdateReportContent parameters @@ -1082,10 +1094,10 @@ public static Report UpdateReportContentInGroup(this IReportsOperations operatio /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// Rebind report parameters @@ -1114,10 +1126,10 @@ public static void RebindReportInGroup(this IReportsOperations operations, Syste /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// Rebind report parameters @@ -1143,10 +1155,10 @@ public static void RebindReportInGroup(this IReportsOperations operations, Syste /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// public static Pages GetPagesInGroup(this IReportsOperations operations, System.Guid groupId, System.Guid reportId) { @@ -1166,10 +1178,10 @@ public static Pages GetPagesInGroup(this IReportsOperations operations, System.G /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// The cancellation token. @@ -1195,10 +1207,10 @@ public static Pages GetPagesInGroup(this IReportsOperations operations, System.G /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// The page name @@ -1221,10 +1233,10 @@ public static Page GetPageInGroup(this IReportsOperations operations, System.Gui /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// The page name @@ -1253,7 +1265,7 @@ public static Page GetPageInGroup(this IReportsOperations operations, System.Gui /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// @@ -1275,7 +1287,7 @@ public static Datasources GetDatasourcesInGroup(this IReportsOperations operatio /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// @@ -1309,10 +1321,10 @@ public static Datasources GetDatasourcesInGroup(this IReportsOperations operatio /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// @@ -1340,10 +1352,10 @@ public static void UpdateDatasourcesInGroup(this IReportsOperations operations, /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// @@ -1372,10 +1384,10 @@ public static void UpdateDatasourcesInGroup(this IReportsOperations operations, /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// Export to file request parameters @@ -1402,10 +1414,10 @@ public static Export ExportToFileInGroup(this IReportsOperations operations, Sys /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// Export to file request parameters @@ -1433,13 +1445,13 @@ public static Export ExportToFileInGroup(this IReportsOperations operations, Sys /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// - /// The export id + /// The export ID /// public static Export GetExportToFileStatusInGroup(this IReportsOperations operations, System.Guid groupId, System.Guid reportId, string exportId) { @@ -1458,13 +1470,13 @@ public static Export GetExportToFileStatusInGroup(this IReportsOperations operat /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// - /// The export id + /// The export ID /// /// /// The cancellation token. @@ -1490,13 +1502,13 @@ public static Export GetExportToFileStatusInGroup(this IReportsOperations operat /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// - /// The export id + /// The export ID /// public static Stream GetFileOfExportToFileInGroup(this IReportsOperations operations, System.Guid groupId, System.Guid reportId, string exportId) { @@ -1516,13 +1528,13 @@ public static Stream GetFileOfExportToFileInGroup(this IReportsOperations operat /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// - /// The export id + /// The export ID /// /// /// The cancellation token. @@ -1562,7 +1574,7 @@ public static Stream GetFileOfExportToFileInGroup(this IReportsOperations operat /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Generate token parameters @@ -1600,7 +1612,7 @@ public static EmbedToken GenerateTokenForCreateInGroup(this IReportsOperations o /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Generate token parameters @@ -1646,10 +1658,10 @@ public static EmbedToken GenerateTokenForCreateInGroup(this IReportsOperations o /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// Generate token parameters @@ -1689,10 +1701,10 @@ public static EmbedToken GenerateTokenInGroup(this IReportsOperations operations /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// Generate token parameters @@ -1724,7 +1736,7 @@ public static EmbedToken GenerateTokenInGroup(this IReportsOperations operations /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Filters the results, based on a boolean condition @@ -1756,7 +1768,7 @@ public static EmbedToken GenerateTokenInGroup(this IReportsOperations operations /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// /// Filters the results, based on a boolean condition @@ -1842,6 +1854,58 @@ public static EmbedToken GenerateTokenInGroup(this IReportsOperations operations } } + /// + /// Returns a list of users that have access to the specified report (Preview). + /// + /// + /// **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/>Delegated permissions + /// are supported. <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The report ID + /// + public static ReportUsers GetReportUsersAsAdmin(this IReportsOperations operations, System.Guid reportId) + { + return operations.GetReportUsersAsAdminAsync(reportId).GetAwaiter().GetResult(); + } + + /// + /// Returns a list of users that have access to the specified report (Preview). + /// + /// + /// **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/>Delegated permissions + /// are supported. <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The report ID + /// + /// + /// The cancellation token. + /// + public static async Task GetReportUsersAsAdminAsync(this IReportsOperations operations, System.Guid reportId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetReportUsersAsAdminWithHttpMessagesAsync(reportId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Transfers ownership over the specified paginated report datasources to the /// current authorized user. @@ -1856,10 +1920,10 @@ public static EmbedToken GenerateTokenInGroup(this IReportsOperations operations /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// public static void TakeOverInGroup(this IReportsOperations operations, System.Guid groupId, System.Guid reportId) { @@ -1880,10 +1944,10 @@ public static void TakeOverInGroup(this IReportsOperations operations, System.Gu /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The report id + /// The report ID /// /// /// The cancellation token. diff --git a/sdk/PowerBI.Api/Source/TilesOperations.cs b/sdk/PowerBI.Api/Source/TilesOperations.cs index cbdc2c5c..b925993e 100644 --- a/sdk/PowerBI.Api/Source/TilesOperations.cs +++ b/sdk/PowerBI.Api/Source/TilesOperations.cs @@ -68,13 +68,13 @@ public TilesOperations(PowerBIClient client) /// document along with considerations and limitations section. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dashboard id + /// The dashboard ID /// /// - /// The tile id + /// The tile ID /// /// /// Generate token parameters diff --git a/sdk/PowerBI.Api/Source/TilesOperationsExtensions.cs b/sdk/PowerBI.Api/Source/TilesOperationsExtensions.cs index 48bac07c..8723630d 100644 --- a/sdk/PowerBI.Api/Source/TilesOperationsExtensions.cs +++ b/sdk/PowerBI.Api/Source/TilesOperationsExtensions.cs @@ -40,13 +40,13 @@ public static partial class TilesOperationsExtensions /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dashboard id + /// The dashboard ID /// /// - /// The tile id + /// The tile ID /// /// /// Generate token parameters @@ -81,13 +81,13 @@ public static EmbedToken GenerateTokenInGroup(this ITilesOperations operations, /// The operations group for this extension method. /// /// - /// The workspace id + /// The workspace ID /// /// - /// The dashboard id + /// The dashboard ID /// /// - /// The tile id + /// The tile ID /// /// /// Generate token parameters diff --git a/sdk/PowerBI.Api/Source/Users.cs b/sdk/PowerBI.Api/Source/Users.cs index bba558d7..30fd77f3 100644 --- a/sdk/PowerBI.Api/Source/Users.cs +++ b/sdk/PowerBI.Api/Source/Users.cs @@ -8,6 +8,7 @@ namespace Microsoft.PowerBI.Api { using Microsoft.Rest; using Models; + using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; using System.IO; @@ -165,5 +166,156 @@ public Users(PowerBIClient client) return _result; } + /// + /// Returns a list of artifacts that the given user have access to (Preview). + /// + /// + /// This API allows 200 requests per hour at maximum. + /// <br/><br/>**Required scope**: Tenant.Read.All or + /// Tenant.ReadWrite.All. <br/>Delegated permissions are supported. + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The graph ID of user + /// + /// + /// Token required to get the next chunk of the result set + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetUserArtifactAccessAsAdminWithHttpMessagesAsync(System.Guid userGraphId, string continuationToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("userGraphId", userGraphId); + tracingParameters.Add("continuationToken", continuationToken); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetUserArtifactAccessAsAdmin", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/admin/users/{userGraphId}/artifactAccess").ToString(); + _url = _url.Replace("{userGraphId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(userGraphId, Client.SerializationSettings).Trim('"'))); + List _queryParameters = new List(); + if (continuationToken != null) + { + _queryParameters.Add(string.Format("continuationToken={0}", System.Uri.EscapeDataString(continuationToken))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + } } diff --git a/sdk/PowerBI.Api/Source/UsersExtensions.cs b/sdk/PowerBI.Api/Source/UsersExtensions.cs index c5480f35..15dbfe66 100644 --- a/sdk/PowerBI.Api/Source/UsersExtensions.cs +++ b/sdk/PowerBI.Api/Source/UsersExtensions.cs @@ -70,5 +70,59 @@ public static void RefreshUserPermissions(this IUsers operations) (await operations.RefreshUserPermissionsWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)).Dispose(); } + /// + /// Returns a list of artifacts that the given user have access to (Preview). + /// + /// + /// This API allows 200 requests per hour at maximum. + /// <br/><br/>**Required scope**: Tenant.Read.All or + /// Tenant.ReadWrite.All. <br/>Delegated permissions are supported. + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The graph ID of user + /// + /// + /// Token required to get the next chunk of the result set + /// + public static ArtifactAccessResponse GetUserArtifactAccessAsAdmin(this IUsers operations, System.Guid userGraphId, string continuationToken = default(string)) + { + return operations.GetUserArtifactAccessAsAdminAsync(userGraphId, continuationToken).GetAwaiter().GetResult(); + } + + /// + /// Returns a list of artifacts that the given user have access to (Preview). + /// + /// + /// This API allows 200 requests per hour at maximum. + /// <br/><br/>**Required scope**: Tenant.Read.All or + /// Tenant.ReadWrite.All. <br/>Delegated permissions are supported. + /// <br/>To set the permissions scope, see [Register an + /// app](https://docs.microsoft.com/power-bi/developer/register-app). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The graph ID of user + /// + /// + /// Token required to get the next chunk of the result set + /// + /// + /// The cancellation token. + /// + public static async Task GetUserArtifactAccessAsAdminAsync(this IUsers operations, System.Guid userGraphId, string continuationToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetUserArtifactAccessAsAdminWithHttpMessagesAsync(userGraphId, continuationToken, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } } diff --git a/sdk/PowerBI.Api/Source/WorkspaceInfoOperations.cs b/sdk/PowerBI.Api/Source/WorkspaceInfoOperations.cs index c0bd7291..2651a225 100644 --- a/sdk/PowerBI.Api/Source/WorkspaceInfoOperations.cs +++ b/sdk/PowerBI.Api/Source/WorkspaceInfoOperations.cs @@ -54,10 +54,10 @@ public WorkspaceInfoOperations(PowerBIClient client) /// **Note:** The user must have administrator rights (such as Microsoft 365 /// Global Administrator or Power BI Service Administrator) to call this API or /// authenticate via service principal. <br/>This API allows a maximum of - /// 500 requests per hour. <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). + /// 500 requests per hour, and not more than 16 simultaneously. + /// <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). /// /// /// Required workspace IDs to get info for @@ -68,6 +68,15 @@ public WorkspaceInfoOperations(PowerBIClient client) /// /// Whether to return datasource details​ /// + /// + /// Whether to return dataset schema (Tables, Columns and Measures)​ + /// + /// + /// Whether to return dataset expressions (Dax query and Mashup)​ + /// + /// + /// Whether to return artifact user details​ (Preview) (Permission level) + /// /// /// Headers that will be added to request. /// @@ -89,7 +98,7 @@ public WorkspaceInfoOperations(PowerBIClient client) /// /// A response object containing the response body and response headers. /// - public async Task> PostWorkspaceInfoWithHttpMessagesAsync(RequiredWorkspaces requiredWorkspaces, bool? lineage = default(bool?), bool? datasourceDetails = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> PostWorkspaceInfoWithHttpMessagesAsync(RequiredWorkspaces requiredWorkspaces, bool? lineage = default(bool?), bool? datasourceDetails = default(bool?), bool? datasetSchema = default(bool?), bool? datasetExpressions = default(bool?), bool? getArtifactUsers = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (requiredWorkspaces == null) { @@ -105,6 +114,9 @@ public WorkspaceInfoOperations(PowerBIClient client) tracingParameters.Add("requiredWorkspaces", requiredWorkspaces); tracingParameters.Add("lineage", lineage); tracingParameters.Add("datasourceDetails", datasourceDetails); + tracingParameters.Add("datasetSchema", datasetSchema); + tracingParameters.Add("datasetExpressions", datasetExpressions); + tracingParameters.Add("getArtifactUsers", getArtifactUsers); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "PostWorkspaceInfo", tracingParameters); } @@ -120,6 +132,18 @@ public WorkspaceInfoOperations(PowerBIClient client) { _queryParameters.Add(string.Format("datasourceDetails={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(datasourceDetails, Client.SerializationSettings).Trim('"')))); } + if (datasetSchema != null) + { + _queryParameters.Add(string.Format("datasetSchema={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(datasetSchema, Client.SerializationSettings).Trim('"')))); + } + if (datasetExpressions != null) + { + _queryParameters.Add(string.Format("datasetExpressions={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(datasetExpressions, Client.SerializationSettings).Trim('"')))); + } + if (getArtifactUsers != null) + { + _queryParameters.Add(string.Format("getArtifactUsers={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(getArtifactUsers, Client.SerializationSettings).Trim('"')))); + } if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); @@ -236,6 +260,8 @@ public WorkspaceInfoOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// + /// The scan ID, which is included in the response from the workspaces or + /// getInfo API that triggered the scan /// /// /// Headers that will be added to request. @@ -377,6 +403,8 @@ public WorkspaceInfoOperations(PowerBIClient client) /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// /// + /// The scan ID, which is included in the response from the workspaces or + /// getInfo API that triggered the scan /// /// /// Headers that will be added to request. @@ -523,6 +551,9 @@ public WorkspaceInfoOperations(PowerBIClient client) /// /// Last modified date​ (must be in ISO 8601 compliant UTC format) /// + /// + /// Whether to exclude personal workspaces​ + /// /// /// Headers that will be added to request. /// @@ -538,7 +569,7 @@ public WorkspaceInfoOperations(PowerBIClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetModifiedWorkspacesWithHttpMessagesAsync(System.DateTime? modifiedSince = default(System.DateTime?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetModifiedWorkspacesWithHttpMessagesAsync(System.DateTime? modifiedSince = default(System.DateTime?), bool? excludePersonalWorkspaces = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -548,6 +579,7 @@ public WorkspaceInfoOperations(PowerBIClient client) _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("modifiedSince", modifiedSince); + tracingParameters.Add("excludePersonalWorkspaces", excludePersonalWorkspaces); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "GetModifiedWorkspaces", tracingParameters); } @@ -559,6 +591,10 @@ public WorkspaceInfoOperations(PowerBIClient client) { _queryParameters.Add(string.Format("modifiedSince={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(modifiedSince, Client.SerializationSettings).Trim('"')))); } + if (excludePersonalWorkspaces != null) + { + _queryParameters.Add(string.Format("excludePersonalWorkspaces={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(excludePersonalWorkspaces, Client.SerializationSettings).Trim('"')))); + } if (_queryParameters.Count > 0) { _url += "?" + string.Join("&", _queryParameters); diff --git a/sdk/PowerBI.Api/Source/WorkspaceInfoOperationsExtensions.cs b/sdk/PowerBI.Api/Source/WorkspaceInfoOperationsExtensions.cs index f5ce4f2f..4d6a131b 100644 --- a/sdk/PowerBI.Api/Source/WorkspaceInfoOperationsExtensions.cs +++ b/sdk/PowerBI.Api/Source/WorkspaceInfoOperationsExtensions.cs @@ -23,10 +23,10 @@ public static partial class WorkspaceInfoOperationsExtensions /// **Note:** The user must have administrator rights (such as Microsoft 365 /// Global Administrator or Power BI Service Administrator) to call this API or /// authenticate via service principal. <br/>This API allows a maximum of - /// 500 requests per hour. <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). + /// 500 requests per hour, and not more than 16 simultaneously. + /// <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). /// /// /// The operations group for this extension method. @@ -40,9 +40,18 @@ public static partial class WorkspaceInfoOperationsExtensions /// /// Whether to return datasource details​ /// - public static ScanRequest PostWorkspaceInfo(this IWorkspaceInfoOperations operations, RequiredWorkspaces requiredWorkspaces, bool? lineage = default(bool?), bool? datasourceDetails = default(bool?)) + /// + /// Whether to return dataset schema (Tables, Columns and Measures)​ + /// + /// + /// Whether to return dataset expressions (Dax query and Mashup)​ + /// + /// + /// Whether to return artifact user details​ (Preview) (Permission level) + /// + public static ScanRequest PostWorkspaceInfo(this IWorkspaceInfoOperations operations, RequiredWorkspaces requiredWorkspaces, bool? lineage = default(bool?), bool? datasourceDetails = default(bool?), bool? datasetSchema = default(bool?), bool? datasetExpressions = default(bool?), bool? getArtifactUsers = default(bool?)) { - return operations.PostWorkspaceInfoAsync(requiredWorkspaces, lineage, datasourceDetails).GetAwaiter().GetResult(); + return operations.PostWorkspaceInfoAsync(requiredWorkspaces, lineage, datasourceDetails, datasetSchema, datasetExpressions, getArtifactUsers).GetAwaiter().GetResult(); } /// @@ -53,10 +62,10 @@ public static partial class WorkspaceInfoOperationsExtensions /// **Note:** The user must have administrator rights (such as Microsoft 365 /// Global Administrator or Power BI Service Administrator) to call this API or /// authenticate via service principal. <br/>This API allows a maximum of - /// 500 requests per hour. <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). + /// 500 requests per hour, and not more than 16 simultaneously. + /// <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). /// /// /// The operations group for this extension method. @@ -70,12 +79,21 @@ public static partial class WorkspaceInfoOperationsExtensions /// /// Whether to return datasource details​ /// + /// + /// Whether to return dataset schema (Tables, Columns and Measures)​ + /// + /// + /// Whether to return dataset expressions (Dax query and Mashup)​ + /// + /// + /// Whether to return artifact user details​ (Preview) (Permission level) + /// /// /// The cancellation token. /// - public static async Task PostWorkspaceInfoAsync(this IWorkspaceInfoOperations operations, RequiredWorkspaces requiredWorkspaces, bool? lineage = default(bool?), bool? datasourceDetails = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task PostWorkspaceInfoAsync(this IWorkspaceInfoOperations operations, RequiredWorkspaces requiredWorkspaces, bool? lineage = default(bool?), bool? datasourceDetails = default(bool?), bool? datasetSchema = default(bool?), bool? datasetExpressions = default(bool?), bool? getArtifactUsers = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.PostWorkspaceInfoWithHttpMessagesAsync(requiredWorkspaces, lineage, datasourceDetails, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.PostWorkspaceInfoWithHttpMessagesAsync(requiredWorkspaces, lineage, datasourceDetails, datasetSchema, datasetExpressions, getArtifactUsers, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -97,6 +115,8 @@ public static partial class WorkspaceInfoOperationsExtensions /// The operations group for this extension method. /// /// + /// The scan ID, which is included in the response from the workspaces or + /// getInfo API that triggered the scan /// public static ScanRequest GetScanStatus(this IWorkspaceInfoOperations operations, System.Guid scanId) { @@ -119,6 +139,8 @@ public static ScanRequest GetScanStatus(this IWorkspaceInfoOperations operations /// The operations group for this extension method. /// /// + /// The scan ID, which is included in the response from the workspaces or + /// getInfo API that triggered the scan /// /// /// The cancellation token. @@ -149,6 +171,8 @@ public static ScanRequest GetScanStatus(this IWorkspaceInfoOperations operations /// The operations group for this extension method. /// /// + /// The scan ID, which is included in the response from the workspaces or + /// getInfo API that triggered the scan /// public static WorkspaceInfoResponse GetScanResult(this IWorkspaceInfoOperations operations, System.Guid scanId) { @@ -173,6 +197,8 @@ public static WorkspaceInfoResponse GetScanResult(this IWorkspaceInfoOperations /// The operations group for this extension method. /// /// + /// The scan ID, which is included in the response from the workspaces or + /// getInfo API that triggered the scan /// /// /// The cancellation token. @@ -208,9 +234,12 @@ public static WorkspaceInfoResponse GetScanResult(this IWorkspaceInfoOperations /// /// Last modified date​ (must be in ISO 8601 compliant UTC format) /// - public static ModifiedWorkspaces GetModifiedWorkspaces(this IWorkspaceInfoOperations operations, System.DateTime? modifiedSince = default(System.DateTime?)) + /// + /// Whether to exclude personal workspaces​ + /// + public static ModifiedWorkspaces GetModifiedWorkspaces(this IWorkspaceInfoOperations operations, System.DateTime? modifiedSince = default(System.DateTime?), bool? excludePersonalWorkspaces = default(bool?)) { - return operations.GetModifiedWorkspacesAsync(modifiedSince).GetAwaiter().GetResult(); + return operations.GetModifiedWorkspacesAsync(modifiedSince, excludePersonalWorkspaces).GetAwaiter().GetResult(); } /// @@ -236,12 +265,15 @@ public static WorkspaceInfoResponse GetScanResult(this IWorkspaceInfoOperations /// /// Last modified date​ (must be in ISO 8601 compliant UTC format) /// + /// + /// Whether to exclude personal workspaces​ + /// /// /// The cancellation token. /// - public static async Task GetModifiedWorkspacesAsync(this IWorkspaceInfoOperations operations, System.DateTime? modifiedSince = default(System.DateTime?), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetModifiedWorkspacesAsync(this IWorkspaceInfoOperations operations, System.DateTime? modifiedSince = default(System.DateTime?), bool? excludePersonalWorkspaces = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetModifiedWorkspacesWithHttpMessagesAsync(modifiedSince, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetModifiedWorkspacesWithHttpMessagesAsync(modifiedSince, excludePersonalWorkspaces, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/sdk/swaggers/swagger.json b/sdk/swaggers/swagger.json index 1ca4ad3c..232b0a07 100644 --- a/sdk/swaggers/swagger.json +++ b/sdk/swaggers/swagger.json @@ -200,7 +200,7 @@ "parameters": [ { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -253,7 +253,7 @@ "parameters": [ { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -277,6 +277,92 @@ "deprecated": false } }, + "/v1.0/myorg/datasets/{datasetId}/executeQueries": { + "post": { + "tags": [ + "Datasets" + ], + "summary": "Executes DAX queries against the provided dataset. The dataset may reside in **\"My Workspace\"** or any other [new workspace](/power-bi/collaborate-share/service-new-workspaces) (V2 workspace).", + "description": "
**Required scope**: Dataset.ReadWrite.All or Dataset.Read.All
To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).

Restrictions

  • This operation is only supported for datasets in a [new workspace](/power-bi/collaborate-share/service-new-workspaces) (V2 workspace)
  • The user issuing the request needs to have [Build permissions for the dataset](power-bi/connect-data/service-datasets-build-permissions).
  • The [Allow XMLA endpoints and Analyze in Excel with on-premises datasets](power-bi/admin/service-premium-connect-tools) tenant setting needs to be enabled.
  • Datasets hosted in AsAzure or live connected to an on premise Analysis Services model are not supported.
  • Only one query returning one table of maximum 100k rows is allowed. Specifying more than one query will return an error.

Notes

  • Issuing a query that returns more than one table or more than 100k rows will return limited data and an error in the response. The response HTTP status will be OK (200).
  • DAX query failures will be returned with a failure HTTP status (400).
  • Columns that are fully qualified in the query will be returned with the fully qualified name, for example, Table[Column]. Columns that are renamed or created in the query will be returned within square bracket, for example, [MyNewColumn].
  • The following errors may be contained in the response: DAX query failures, more than one result table in a query, more than 100k rows in a query result.
", + "operationId": "Datasets_ExecuteQueries", + "consumes": [], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "datasetId", + "in": "path", + "description": "The dataset ID", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "requestMessage", + "description": "The request message", + "required": true, + "schema": { + "$ref": "#/definitions/DatasetExecuteQueriesRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/DatasetExecuteQueriesResponse" + } + } + }, + "deprecated": false, + "x-ms-examples": { + "Execute queries example": { + "parameters": { + "datasetId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "requestMessage": { + "queries": [ + { + "query": "EVALUATE VALUES(MyTable[Column])" + } + ], + "serializerSettings": { + "includeNulls": true + } + } + }, + "responses": { + "200": { + "body": { + "results": [ + { + "tables": [ + { + "rows": [ + { + "MyTable[Year]": 2010, + "MyTable[Quarter]": "Q1" + }, + { + "MyTable[Year]": 2010, + "MyTable[Quarter]": "Q2" + }, + { + "MyTable[Year]": 2011, + "MyTable[Quarter]": "Q1" + } + ] + } + ] + } + ] + } + } + } + } + } + } + }, "/v1.0/myorg/datasets/{datasetId}/tables": { "get": { "tags": [ @@ -294,7 +380,7 @@ "parameters": [ { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -329,7 +415,7 @@ { "name": "datasetId", "in": "path", - "description": "The dataset id", + "description": "The dataset ID", "required": true, "type": "string" }, @@ -424,7 +510,7 @@ "name": "datasetId", "in": "path", "required": true, - "description": "The dataset id", + "description": "The dataset ID", "type": "string" }, { @@ -504,7 +590,7 @@ { "name": "datasetId", "in": "path", - "description": "The dataset id", + "description": "The dataset ID", "required": true, "type": "string" }, @@ -550,7 +636,7 @@ "parameters": [ { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -654,7 +740,7 @@ "parameters": [ { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -704,7 +790,7 @@ "parameters": [ { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -753,7 +839,7 @@ "parameters": [ { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -847,7 +933,7 @@ "parameters": [ { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -909,7 +995,7 @@ "parameters": [ { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -1003,7 +1089,7 @@ "parameters": [ { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -1088,7 +1174,7 @@ "parameters": [ { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -1149,7 +1235,7 @@ "parameters": [ { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -1367,7 +1453,7 @@ "parameters": [ { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -1445,7 +1531,7 @@ { "name": "datasetId", "in": "path", - "description": "The dataset id", + "description": "The dataset ID", "required": true, "type": "string" }, @@ -1485,7 +1571,7 @@ "tags": [ "Datasets" ], - "summary": "Binds the specified dataset from **\"My Workspace\"** to the specified gateway with (optional) given set of datasource Ids. This only supports the On-Premises Data Gateway.", + "summary": "Binds the specified dataset from **\"My Workspace\"** to the specified gateway, optionally with a given set of datasource IDs. This only supports the on-premises data gateway.", "description": "
**Note:** API caller principal should be added as datasource user on the gateway.

**Required scope**: Dataset.ReadWrite.All
To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", "operationId": "Datasets_BindToGateway", "consumes": [ @@ -1498,7 +1584,7 @@ { "name": "datasetId", "in": "path", - "description": "The dataset id", + "description": "The dataset ID", "required": true, "type": "string" }, @@ -1562,7 +1648,7 @@ "parameters": [ { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -1617,7 +1703,7 @@ "parameters": [ { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -1825,6 +1911,20 @@ "description": "Determines whether to skip report import, if specified value must be 'true'. Only supported for PBIX files.", "type": "boolean" }, + { + "name": "overrideReportLabel", + "in": "query", + "required": false, + "description": "Determines whether to override existing label on report during republish of PBIX file, service default value is true.", + "type": "boolean" + }, + { + "name": "overrideModelLabel", + "in": "query", + "required": false, + "description": "Determines whether to override existing label on model during republish of PBIX file, service default value is true.", + "type": "boolean" + }, { "name": "importInfo", "in": "body", @@ -1877,6 +1977,8 @@ "datasetDisplayName": "MyReport", "nameConflict": "Ignore", "skipReport": true, + "overrideReportLabel": true, + "overrideModelLabel": true, "importInfo": { "value": "--f05e5244-f876-43b9-bc87-d71598f6b32a Content-Disposition: form-data AA...ZZ --f05e5244-f876-43b9-bc87-d71598f6b32a--" } @@ -1930,7 +2032,7 @@ "name": "importId", "in": "path", "required": true, - "description": "The import id", + "description": "The import ID", "type": "string", "format": "uuid" } @@ -2097,7 +2199,7 @@ "parameters": [ { "name": "reportId", - "description": "The report id", + "description": "The report ID", "in": "path", "required": true, "type": "string", @@ -2148,7 +2250,7 @@ "parameters": [ { "name": "reportId", - "description": "The report id", + "description": "The report ID", "in": "path", "required": true, "type": "string", @@ -2190,7 +2292,7 @@ "parameters": [ { "name": "reportId", - "description": "The report id", + "description": "The report ID", "in": "path", "required": true, "type": "string", @@ -2223,7 +2325,7 @@ "Reports" ], "summary": "Exports the specified report from **\"My Workspace\"** to a .pbix file.", - "description": "
**Required scope**: Report.ReadWrite.All or Report.Read.All
To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).

Restrictions

Export of a report with [Power BI service live connection](https://docs.microsoft.com/en-us/power-bi/desktop-report-lifecycle-datasets) after calling [rebind report](/rest/api/power-bi/reports/RebindReport) is not supported.
", + "description": "
**Note**: As a [workaround for fixing timeout issues](/power-bi/developer/embedded/embedded-troubleshoot#how-to-fix-timeout-exceptions-when-using-import-and-export-apis), you can set `preferClientRouting` to true.

**Required scope**: Report.ReadWrite.All or Report.Read.All
To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).

Restrictions

Export of a report with [Power BI service live connection](https://docs.microsoft.com/en-us/power-bi/desktop-report-lifecycle-datasets) after calling [rebind report](/rest/api/power-bi/reports/RebindReport) is not supported.
", "operationId": "Reports_ExportReport", "consumes": [], "produces": [ @@ -2233,7 +2335,7 @@ { "name": "reportId", "in": "path", - "description": "The report id", + "description": "The report ID", "required": true, "type": "string", "format": "uuid" @@ -2267,7 +2369,7 @@ "parameters": [ { "name": "reportId", - "description": "The report id", + "description": "The report ID", "in": "path", "required": true, "type": "string", @@ -2329,7 +2431,7 @@ { "name": "reportId", "in": "path", - "description": "The report id", + "description": "The report ID", "required": true, "type": "string", "format": "uuid" @@ -2370,7 +2472,7 @@ { "name": "reportId", "in": "path", - "description": "The report id", + "description": "The report ID", "required": true, "type": "string", "format": "uuid" @@ -2430,7 +2532,7 @@ { "name": "reportId", "in": "path", - "description": "The report id", + "description": "The report ID", "required": true, "type": "string", "format": "uuid" @@ -2488,7 +2590,7 @@ "parameters": [ { "name": "reportId", - "description": "The report id", + "description": "The report ID", "in": "path", "required": true, "type": "string", @@ -2548,7 +2650,7 @@ "parameters": [ { "name": "reportId", - "description": "The report id", + "description": "The report ID", "in": "path", "required": true, "type": "string", @@ -2618,7 +2720,7 @@ { "name": "reportId", "in": "path", - "description": "The report id", + "description": "The report ID", "required": true, "type": "string", "format": "uuid" @@ -2662,7 +2764,7 @@ { "name": "reportId", "in": "path", - "description": "The report id", + "description": "The report ID", "required": true, "type": "string", "format": "uuid" @@ -2671,7 +2773,7 @@ "name": "exportId", "in": "path", "required": true, - "description": "The export id", + "description": "The export ID", "type": "string" } ], @@ -2714,7 +2816,7 @@ { "name": "reportId", "in": "path", - "description": "The report id", + "description": "The report ID", "required": true, "type": "string", "format": "uuid" @@ -2723,7 +2825,7 @@ "name": "exportId", "in": "path", "required": true, - "description": "The export id", + "description": "The export ID", "type": "string" } ], @@ -2855,7 +2957,7 @@ "parameters": [ { "name": "dashboardId", - "description": "The dashboard id", + "description": "The dashboard ID", "in": "path", "required": true, "type": "string", @@ -2907,7 +3009,7 @@ "parameters": [ { "name": "dashboardId", - "description": "The dashboard id", + "description": "The dashboard ID", "in": "path", "required": true, "type": "string", @@ -2966,7 +3068,7 @@ "parameters": [ { "name": "dashboardId", - "description": "The dashboard id", + "description": "The dashboard ID", "in": "path", "required": true, "type": "string", @@ -2974,7 +3076,7 @@ }, { "name": "tileId", - "description": "The tile id", + "description": "The tile ID", "in": "path", "required": true, "type": "string", @@ -3019,7 +3121,7 @@ "Dashboards" ], "summary": "Clones the specified tile from **\"My Workspace\"**.", - "description": "
If target report id and target dataset are not specified, the following can occur:
  • When a tile clone is performed within the same workspace, the report and dataset links will be cloned from the source tile.
  • When cloning a tile within a different workspace, report and dataset links will be rested, and the tile will be broken.

  • **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.

    **Required scope**: Dashboard.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "description": "
    If target report ID and target dataset are not specified, the following can occur:
  • When a tile clone is performed within the same workspace, the report and dataset links will be cloned from the source tile.
  • When cloning a tile within a different workspace, report and dataset links will be rested, and the tile will be broken.

  • **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.

    **Required scope**: Dashboard.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", "operationId": "Dashboards_CloneTile", "consumes": [ "application/json" @@ -3030,7 +3132,7 @@ "parameters": [ { "name": "dashboardId", - "description": "The dashboard id", + "description": "The dashboard ID", "in": "path", "required": true, "type": "string", @@ -3038,7 +3140,7 @@ }, { "name": "tileId", - "description": "The tile id", + "description": "The tile ID", "in": "path", "required": true, "type": "string", @@ -3084,7 +3186,7 @@ { "name": "groupId", "in": "path", - "description": "The workspace id", + "description": "The workspace ID", "required": true, "type": "string", "format": "uuid" @@ -3142,7 +3244,7 @@ { "name": "groupId", "in": "path", - "description": "The workspace id", + "description": "The workspace ID", "required": true, "type": "string", "format": "uuid" @@ -3271,7 +3373,7 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" } @@ -3306,13 +3408,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -3368,13 +3470,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -3418,13 +3520,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -3460,14 +3562,14 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "datasetId", "in": "path", - "description": "The dataset id", + "description": "The dataset ID", "required": true, "type": "string" }, @@ -3563,7 +3665,7 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, @@ -3571,7 +3673,7 @@ "name": "datasetId", "in": "path", "required": true, - "description": "The dataset id", + "description": "The dataset ID", "type": "string" }, { @@ -3653,14 +3755,14 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "datasetId", "in": "path", - "description": "The dataset id", + "description": "The dataset ID", "required": true, "type": "string" }, @@ -3709,13 +3811,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -3823,13 +3925,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -3882,13 +3984,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -3940,13 +4042,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -4046,13 +4148,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -4118,13 +4220,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -4212,7 +4314,7 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, @@ -4305,7 +4407,7 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, @@ -4374,7 +4476,7 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, @@ -4473,7 +4575,7 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, @@ -4558,14 +4660,14 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "datasetId", "in": "path", - "description": "The dataset id", + "description": "The dataset ID", "required": true, "type": "string" }, @@ -4606,7 +4708,7 @@ "tags": [ "Datasets" ], - "summary": "Binds the specified dataset from the specified workspace to the specified gateway with (optional) given set of datasource Ids. This only supports the On-Premises Data Gateway.", + "summary": "Binds the specified dataset from the specified workspace to the specified gateway, optionally with a given set of datasource IDs. This only supports the on-premises data gateway.", "description": "
    **Note:** API caller principal should be added as datasource user on the gateway.

    **Required scope**: Dataset.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", "operationId": "Datasets_BindToGatewayInGroup", "consumes": [ @@ -4620,14 +4722,14 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "datasetId", "in": "path", - "description": "The dataset id", + "description": "The dataset ID", "required": true, "type": "string" }, @@ -4695,13 +4797,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -4759,13 +4861,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -4822,14 +4924,14 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "datasetId", "in": "path", - "description": "The dataset id", + "description": "The dataset ID", "required": true, "type": "string" } @@ -4873,7 +4975,7 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" } @@ -4946,7 +5048,7 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, @@ -5004,6 +5106,20 @@ "description": "Determines whether to skip report import, if specified value must be 'true'. Only supported for PBIX files.", "type": "boolean" }, + { + "name": "overrideReportLabel", + "in": "query", + "required": false, + "description": "Determines whether to override existing label on report during republish of PBIX file, service default value is true.", + "type": "boolean" + }, + { + "name": "overrideModelLabel", + "in": "query", + "required": false, + "description": "Determines whether to override existing label on model during republish of PBIX file, service default value is true.", + "type": "boolean" + }, { "name": "importInfo", "in": "body", @@ -5058,6 +5174,8 @@ "datasetDisplayName": "MyReport", "nameConflict": "Ignore", "skipReport": true, + "overrideReportLabel": true, + "overrideModelLabel": true, "importInfo": { "value": "--f05e5244-f876-43b9-bc87-d71598f6b32a Content-Disposition: form-data AA...ZZ --f05e5244-f876-43b9-bc87-d71598f6b32a--" } @@ -5113,7 +5231,7 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, @@ -5121,7 +5239,7 @@ "name": "importId", "in": "path", "required": true, - "description": "The import id", + "description": "The import ID", "type": "string", "format": "uuid" } @@ -5218,7 +5336,7 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" } @@ -5254,7 +5372,7 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" } @@ -5308,13 +5426,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "reportId", - "description": "The report id", + "description": "The report ID", "in": "path", "required": true, "type": "string", @@ -5368,13 +5486,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "reportId", - "description": "The report id", + "description": "The report ID", "in": "path", "required": true, "type": "string", @@ -5419,13 +5537,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "reportId", - "description": "The report id", + "description": "The report ID", "in": "path", "required": true, "type": "string", @@ -5458,7 +5576,7 @@ "Reports" ], "summary": "Exports the specified report from the specified workspace to a .pbix file.", - "description": "
    **Required scope**: Report.ReadWrite.All or Report.Read.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).

    Restrictions

    Export of a report with [Power BI service live connection](https://docs.microsoft.com/en-us/power-bi/desktop-report-lifecycle-datasets) after calling [rebind report](/rest/api/power-bi/reports/RebindReport) is not supported.
    ", + "description": "
    **Note**: As a [workaround for fixing timeout issues](/power-bi/developer/embedded/embedded-troubleshoot#how-to-fix-timeout-exceptions-when-using-import-and-export-apis), you can set `preferClientRouting` to true.

    **Required scope**: Report.ReadWrite.All or Report.Read.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).

    Restrictions

    Export of a report with [Power BI service live connection](https://docs.microsoft.com/en-us/power-bi/desktop-report-lifecycle-datasets) after calling [rebind report](/rest/api/power-bi/reports/RebindReport) is not supported.
    ", "operationId": "Reports_ExportReportInGroup", "consumes": [], "produces": [ @@ -5469,7 +5587,7 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, @@ -5477,7 +5595,7 @@ "name": "reportId", "in": "path", "required": true, - "description": "The report id", + "description": "The report ID", "type": "string", "format": "uuid" } @@ -5512,13 +5630,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "reportId", - "description": "The report id", + "description": "The report ID", "in": "path", "required": true, "type": "string", @@ -5582,14 +5700,14 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "reportId", "in": "path", - "description": "The report id", + "description": "The report ID", "required": true, "type": "string", "format": "uuid" @@ -5631,14 +5749,14 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "reportId", "in": "path", - "description": "The report id", + "description": "The report ID", "required": true, "type": "string", "format": "uuid" @@ -5700,14 +5818,14 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "reportId", "in": "path", - "description": "The report id", + "description": "The report ID", "required": true, "type": "string", "format": "uuid" @@ -5768,7 +5886,7 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, @@ -5835,13 +5953,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "reportId", - "description": "The report id", + "description": "The report ID", "in": "path", "required": true, "type": "string", @@ -5912,14 +6030,14 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "reportId", "in": "path", - "description": "The report id", + "description": "The report ID", "required": true, "type": "string", "format": "uuid" @@ -5964,14 +6082,14 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "reportId", "in": "path", - "description": "The report id", + "description": "The report ID", "required": true, "type": "string", "format": "uuid" @@ -5980,7 +6098,7 @@ "name": "exportId", "in": "path", "required": true, - "description": "The export id", + "description": "The export ID", "type": "string" } ], @@ -6024,14 +6142,14 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "reportId", "in": "path", - "description": "The report id", + "description": "The report ID", "required": true, "type": "string", "format": "uuid" @@ -6040,7 +6158,7 @@ "name": "exportId", "in": "path", "required": true, - "description": "The export id", + "description": "The export ID", "type": "string" } ], @@ -6074,7 +6192,7 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" } @@ -6128,7 +6246,7 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, @@ -6192,13 +6310,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "dashboardId", - "description": "The dashboard id", + "description": "The dashboard ID", "in": "path", "required": true, "type": "string", @@ -6253,13 +6371,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "dashboardId", - "description": "The dashboard id", + "description": "The dashboard ID", "in": "path", "required": true, "type": "string", @@ -6321,13 +6439,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "dashboardId", - "description": "The dashboard id", + "description": "The dashboard ID", "in": "path", "required": true, "type": "string", @@ -6335,7 +6453,7 @@ }, { "name": "tileId", - "description": "The tile id", + "description": "The tile ID", "in": "path", "required": true, "type": "string", @@ -6380,7 +6498,7 @@ "Dashboards" ], "summary": "Clones the specified tile from the specified workspace.", - "description": "
    If target report id and target dataset are missing, the following can occur:
  • When a tile clone is performed within the same workspace, the report and dataset links will be cloned from the source tile.
  • If you are cloning a tile within a different workspace, report and dataset links will be rested. The tile will be broken.

  • **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.

    **Required scope**: Dashboard.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "description": "
    If target report ID and target dataset are missing, the following can occur:
  • When a tile clone is performed within the same workspace, the report and dataset links will be cloned from the source tile.
  • If you are cloning a tile within a different workspace, report and dataset links will be rested. The tile will be broken.

  • **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.

    **Required scope**: Dashboard.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", "operationId": "Dashboards_CloneTileInGroup", "consumes": [ "application/json" @@ -6393,13 +6511,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "dashboardId", - "description": "The dashboard id", + "description": "The dashboard ID", "in": "path", "required": true, "type": "string", @@ -6407,7 +6525,7 @@ }, { "name": "tileId", - "description": "The tile id", + "description": "The tile ID", "in": "path", "required": true, "type": "string", @@ -6454,7 +6572,7 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, @@ -6543,13 +6661,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "reportId", - "description": "The report id", + "description": "The report ID", "in": "path", "required": true, "type": "string", @@ -6767,13 +6885,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "datasetId", - "description": "The dataset id", + "description": "The dataset ID", "in": "path", "required": true, "type": "string" @@ -6838,13 +6956,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "dashboardId", - "description": "The dashboard id", + "description": "The dashboard ID", "in": "path", "required": true, "type": "string", @@ -6948,13 +7066,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "dashboardId", - "description": "The dashboard id", + "description": "The dashboard ID", "in": "path", "required": true, "type": "string", @@ -6962,7 +7080,7 @@ }, { "name": "tileId", - "description": "The tile id", + "description": "The tile ID", "in": "path", "required": true, "type": "string", @@ -7145,7 +7263,7 @@ "name": "appId", "in": "path", "required": true, - "description": "The app id", + "description": "The app ID", "type": "string", "format": "uuid" } @@ -7198,7 +7316,7 @@ "name": "appId", "in": "path", "required": true, - "description": "The app id", + "description": "The app ID", "type": "string", "format": "uuid" } @@ -7257,13 +7375,13 @@ "name": "appId", "in": "path", "required": true, - "description": "The app id", + "description": "The app ID", "type": "string", "format": "uuid" }, { "name": "reportId", - "description": "The report id", + "description": "The report ID", "in": "path", "required": true, "type": "string", @@ -7320,7 +7438,7 @@ "name": "appId", "in": "path", "required": true, - "description": "The app id", + "description": "The app ID", "type": "string", "format": "uuid" } @@ -7378,13 +7496,13 @@ "name": "appId", "in": "path", "required": true, - "description": "The app id", + "description": "The app ID", "type": "string", "format": "uuid" }, { "name": "dashboardId", - "description": "The dashboard id", + "description": "The dashboard ID", "in": "path", "required": true, "type": "string", @@ -7441,13 +7559,13 @@ "name": "appId", "in": "path", "required": true, - "description": "The app id", + "description": "The app ID", "type": "string", "format": "uuid" }, { "name": "dashboardId", - "description": "The dashboard id", + "description": "The dashboard ID", "in": "path", "required": true, "type": "string", @@ -7510,13 +7628,13 @@ "name": "appId", "in": "path", "required": true, - "description": "The app id", + "description": "The app ID", "type": "string", "format": "uuid" }, { "name": "dashboardId", - "description": "The dashboard id", + "description": "The dashboard ID", "in": "path", "required": true, "type": "string", @@ -7524,7 +7642,7 @@ }, { "name": "tileId", - "description": "The tile id", + "description": "The tile ID", "in": "path", "required": true, "type": "string", @@ -7582,13 +7700,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "dataflowId", - "description": "The dataflow id", + "description": "The dataflow ID", "in": "path", "required": true, "type": "string", @@ -7619,13 +7737,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "dataflowId", - "description": "The dataflow id", + "description": "The dataflow ID", "in": "path", "required": true, "type": "string", @@ -7666,13 +7784,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "dataflowId", - "description": "The dataflow id", + "description": "The dataflow ID", "in": "path", "required": true, "type": "string", @@ -7732,13 +7850,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "dataflowId", - "description": "The dataflow id", + "description": "The dataflow ID", "in": "path", "required": true, "type": "string", @@ -7805,13 +7923,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "dataflowId", - "description": "The dataflow id", + "description": "The dataflow ID", "in": "path", "required": true, "type": "string", @@ -7879,7 +7997,7 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" } @@ -7935,13 +8053,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "dataflowId", - "description": "The dataflow id", + "description": "The dataflow ID", "in": "path", "required": true, "type": "string", @@ -7976,13 +8094,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "dataflowId", - "description": "The dataflow id", + "description": "The dataflow ID", "in": "path", "required": true, "type": "string", @@ -8087,13 +8205,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "dataflowId", - "description": "The dataflow id", + "description": "The dataflow ID", "in": "path", "required": true, "type": "string", @@ -8135,7 +8253,7 @@ "deprecated": false } }, - "/v1.0/myorg/groups/{groupId}/dataflows//transactions/{transactionId}/cancel": { + "/v1.0/myorg/groups/{groupId}/dataflows/transactions/{transactionId}/cancel": { "post": { "tags": [ "Dataflows" @@ -8152,13 +8270,13 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "transactionId", - "description": "The transaction id", + "description": "The transaction ID", "in": "path", "required": true, "type": "string", @@ -8255,7 +8373,7 @@ { "name": "gatewayId", "in": "path", - "description": "The gateway id", + "description": "The gateway ID. When using a gateway cluster, the gateway ID refers to the primary (first) gateway in the cluster. In such cases, gateway ID is similar to gateway cluster ID.", "required": true, "type": "string", "format": "uuid" @@ -8308,7 +8426,7 @@ { "name": "gatewayId", "in": "path", - "description": "The gateway id", + "description": "The gateway ID. When using a gateway cluster, the gateway ID refers to the primary (first) gateway in the cluster. In such cases, gateway ID is similar to gateway cluster ID.", "required": true, "type": "string", "format": "uuid" @@ -8372,7 +8490,7 @@ { "name": "gatewayId", "in": "path", - "description": "The gateway id", + "description": "The gateway ID. When using a gateway cluster, the gateway ID refers to the primary (first) gateway in the cluster. In such cases, gateway ID is similar to gateway cluster ID.", "required": true, "type": "string", "format": "uuid" @@ -8458,7 +8576,7 @@ { "name": "gatewayId", "in": "path", - "description": "The gateway id", + "description": "The gateway ID. When using a gateway cluster, the gateway ID refers to the primary (first) gateway in the cluster. In such cases, gateway ID is similar to gateway cluster ID.", "required": true, "type": "string", "format": "uuid" @@ -8466,7 +8584,7 @@ { "name": "datasourceId", "in": "path", - "description": "The datasource id", + "description": "The datasource ID", "required": true, "type": "string", "format": "uuid" @@ -8515,7 +8633,7 @@ { "name": "gatewayId", "in": "path", - "description": "The gateway id", + "description": "The gateway ID. When using a gateway cluster, the gateway ID refers to the primary (first) gateway in the cluster. In such cases, gateway ID is similar to gateway cluster ID.", "required": true, "type": "string", "format": "uuid" @@ -8523,7 +8641,7 @@ { "name": "datasourceId", "in": "path", - "description": "The datasource id", + "description": "The datasource ID", "required": true, "type": "string", "format": "uuid" @@ -8560,7 +8678,7 @@ { "name": "gatewayId", "in": "path", - "description": "The gateway id", + "description": "The gateway ID. When using a gateway cluster, the gateway ID refers to the primary (first) gateway in the cluster. In such cases, gateway ID is similar to gateway cluster ID.", "required": true, "type": "string", "format": "uuid" @@ -8568,7 +8686,7 @@ { "name": "datasourceId", "in": "path", - "description": "The datasource id", + "description": "The datasource ID", "required": true, "type": "string", "format": "uuid" @@ -8700,7 +8818,7 @@ { "name": "gatewayId", "in": "path", - "description": "The gateway id", + "description": "The gateway ID. When using a gateway cluster, the gateway ID refers to the primary (first) gateway in the cluster. In such cases, gateway ID is similar to gateway cluster ID.", "required": true, "type": "string", "format": "uuid" @@ -8708,7 +8826,7 @@ { "name": "datasourceId", "in": "path", - "description": "The datasource id", + "description": "The datasource ID", "required": true, "type": "string", "format": "uuid" @@ -8761,7 +8879,7 @@ { "name": "gatewayId", "in": "path", - "description": "The gateway id", + "description": "The gateway ID. When using a gateway cluster, the gateway ID refers to the primary (first) gateway in the cluster. In such cases, gateway ID is similar to gateway cluster ID.", "required": true, "type": "string", "format": "uuid" @@ -8769,7 +8887,7 @@ { "name": "datasourceId", "in": "path", - "description": "The datasource id", + "description": "The datasource ID", "required": true, "type": "string", "format": "uuid" @@ -8828,7 +8946,7 @@ { "name": "gatewayId", "in": "path", - "description": "The gateway id", + "description": "The gateway ID. When using a gateway cluster, the gateway ID refers to the primary (first) gateway in the cluster. In such cases, gateway ID is similar to gateway cluster ID.", "required": true, "type": "string", "format": "uuid" @@ -8836,7 +8954,7 @@ { "name": "datasourceId", "in": "path", - "description": "The datasource id", + "description": "The datasource ID", "required": true, "type": "string", "format": "uuid" @@ -8904,7 +9022,7 @@ { "name": "gatewayId", "in": "path", - "description": "The gateway id", + "description": "The gateway ID. When using a gateway cluster, the gateway ID refers to the primary (first) gateway in the cluster. In such cases, gateway ID is similar to gateway cluster ID.", "required": true, "type": "string", "format": "uuid" @@ -8912,7 +9030,7 @@ { "name": "datasourceId", "in": "path", - "description": "The datasource id", + "description": "The datasource ID", "required": true, "type": "string", "format": "uuid" @@ -8920,7 +9038,7 @@ { "name": "emailAdress", "in": "path", - "description": "The user's email address or the service principal object id", + "description": "The user's email address or the object ID of the service principal", "required": true, "type": "string" } @@ -9148,7 +9266,7 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id to delete", + "description": "The workspace ID to delete", "type": "string", "format": "uuid" } @@ -9187,7 +9305,7 @@ { "name": "groupId", "in": "path", - "description": "The workspace id", + "description": "The workspace ID", "required": true, "type": "string", "format": "uuid" @@ -9252,7 +9370,7 @@ { "name": "groupId", "in": "path", - "description": "The workspace id", + "description": "The workspace ID", "required": true, "type": "string", "format": "uuid" @@ -9317,7 +9435,7 @@ { "name": "groupId", "in": "path", - "description": "The workspace id", + "description": "The workspace ID", "required": true, "type": "string", "format": "uuid" @@ -9384,7 +9502,7 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, @@ -9392,7 +9510,7 @@ "name": "user", "in": "path", "required": true, - "description": "The email address of the user or the service principal object id to delete", + "description": "The email address of the user or object ID of the service principal to delete", "type": "string" } ], @@ -9482,7 +9600,7 @@ { "name": "capacityId", "in": "path", - "description": "The capacity Id", + "description": "The capacity ID", "required": true, "type": "string", "format": "uuid" @@ -9539,7 +9657,7 @@ { "name": "capacityId", "in": "path", - "description": "The capacity Id", + "description": "The capacity ID", "required": true, "type": "string", "format": "uuid" @@ -9596,7 +9714,7 @@ { "name": "capacityId", "in": "path", - "description": "The capacity Id", + "description": "The capacity ID", "required": true, "type": "string", "format": "uuid" @@ -9878,7 +9996,7 @@ "parameters": [ { "name": "capacityId", - "description": "The capacity id", + "description": "The capacity ID", "in": "path", "required": true, "type": "string", @@ -10107,7 +10225,7 @@ "parameters": [ { "name": "capacityId", - "description": "The capacity id", + "description": "The capacity ID", "in": "path", "required": true, "type": "string", @@ -10115,7 +10233,7 @@ }, { "name": "refreshableId", - "description": "The refreshable id", + "description": "The refreshable ID", "in": "path", "required": true, "type": "string" @@ -10312,7 +10430,7 @@ { "name": "groupId", "in": "path", - "description": "The workspace id", + "description": "The workspace ID", "required": true, "type": "string", "format": "uuid" @@ -10419,7 +10537,7 @@ { "name": "groupId", "in": "path", - "description": "The workspace id", + "description": "The workspace ID", "required": true, "type": "string", "format": "uuid" @@ -10569,26 +10687,28 @@ } }, - "/v1.0/myorg/dataflowStorageAccounts": { + "/v1.0/myorg/pipelines": { "get": { "tags": [ - "DataflowStorageAccounts" + "Pipelines" ], - "summary": "Returns a list of dataflow storage accounts the user has access to.", - "description": "
    **Required scope**: StorageAccount.Read.All or StorageAccount.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "DataflowStorageAccounts_GetDataflowStorageAccounts", + "summary": "Returns a list of deployment pipelines the user has access to.", + "description": "
    **Required scope**: Pipeline.Read.All or Pipeline.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Pipelines_GetPipelines", "consumes": [ + ], "produces": [ "application/json" ], "parameters": [ + ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/DataflowStorageAccounts" + "$ref": "#/definitions/Pipelines" } } }, @@ -10599,9 +10719,9 @@ "200": { "value": [ { - "id": "d692ae06-708c-485e-9987-06ff0fbdbb1f", - "name": "MyDataflowStorageAccount", - "isEnabled": true + "id": "a5ded933-57b7-41f4-b072-ed4c1f9d5824", + "displayName": "Marketing Deployment Pipeline", + "description": "Power BI deployment pipeline to manage marketing reports" } ] } @@ -10611,126 +10731,174 @@ "deprecated": false } }, - "/v1.0/myorg/groups/{groupId}/AssignToDataflowStorage": { - "post": { + "/v1.0/myorg/pipelines/{pipelineId}": { + "get": { "tags": [ - "DataflowStorageAccounts" + "Pipelines" ], - "summary": "Assigns the specified workspace to the specified dataflow storage account.", - "description": "**Note**: To perform this operation, the user must be an admin on the specified workspace and the Power BI dataflow storage account must be enabled. To unassign the specified workspace from a Power BI dataflow storage account, an empty GUID (00000000-0000-0000-0000-000000000000) should be provided as dataflowStorageId.

    **Required scope**: StorageAccount.ReadWrite.All and Workspace.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Groups_AssignToDataflowStorage", + "summary": "Returns the specified deployment pipeline.", + "description": "
    **Required scope**: Pipeline.ReadWrite.All or Pipeline.Read.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Pipelines_GetPipeline", "consumes": [ - "application/json" + ], "produces": [ + "application/json" ], "parameters": [ { - "name": "groupId", + "name": "pipelineId", "in": "path", - "description": "The workspace id", + "description": "The deployment pipeline ID", "required": true, "type": "string", "format": "uuid" }, { - "name": "requestParameters", - "in": "body", - "description": "Assign to Power BI dataflow storage account parameters", - "required": true, - "schema": { - "$ref": "#/definitions/AssignToDataflowStorageRequest" - } + "name": "$expand", + "description": "Expands related entities inline, receives a comma-separated list of data types. Supported: stages", + "in": "query", + "type": "string", + "required": false, + "default": "stages" } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "schema": { + "$ref": "#/definitions/Pipeline" + } } }, "x-ms-examples": { - "example": { + "Get pipeline without using expand stages": { "parameters": { - "groupId": "f089354e-8366-4e18-aea3-4cb4a3a50b48", - "requestParameters": { - "dataflowStorageId": "d692ae06-708c-485e-9987-06ff0fbdbb1f" + "pipelineId": "a5ded933-57b7-41f4-b072-ed4c1f9d5824" + }, + "responses": { + "200": { + "body": { + "id": "a5ded933-57b7-41f4-b072-ed4c1f9d5824", + "displayName": "Marketing Deployment Pipeline", + "description": "Power BI deployment pipeline to manage marketing reports" + } } + } + }, + "Get pipeline using expand stages": { + "parameters": { + "pipelineId": "a5ded933-57b7-41f4-b072-ed4c1f9d5824", + "$expand": "stages" }, "responses": { - "200": {} + "200": { + "body": { + "id": "a5ded933-57b7-41f4-b072-ed4c1f9d5824", + "displayName": "My Deployment Pipeline", + "description": "My deployment pipeline", + "stages": [ + { + "order": 0, + "workspaceId": "4de5bcc4-2c88-4efe-b827-4ee7b289b496", + "workspaceName": "Workpsace-Development" + }, + { + "order": 1, + "workspaceId": "44b499cf-1eeb-45e2-9ada-63b6ec9d516e" + }, + { + "order": 2 + } + ] + } + } } } }, "deprecated": false } }, - - "/v1.0/myorg/admin/workspaces/getInfo": { - "post": { + "/v1.0/myorg/pipelines/{pipelineId}/stages/{stageOrder}/artifacts": { + "get": { "tags": [ - "Admin" + "Pipelines" ], - "summary": "Initiate a call to receive metadata for the requested list of workspaces. (Preview)", - "description": "**Note:** The user must have administrator rights (such as Microsoft 365 Global Administrator or Power BI Service Administrator) to call this API or authenticate via service principal.
    This API allows a maximum of 500 requests per hour.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "WorkspaceInfo_PostWorkspaceInfo", + "summary": "Returns the supported items from the workspace assigned to the specified deployment pipeline stage. To learn more about items that are not supported in deployment pipelines, see [unsupported items](https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#unsupported-items)", + "description": "**Note**: To perform this operation, the user must be at least a contributor on the workspace assigned to the specified stage. For more information, see [permissions]([https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#permissions)

    **Required scope**: Pipeline.ReadWrite.All or Pipeline.Read.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Pipelines_GetPipelineStageArtifacts", "consumes": [ - "application/json" + ], "produces": [ "application/json" ], "parameters": [ { - "name": "requiredWorkspaces", - "in": "body", - "description": "Required workspace IDs to get info for", + "name": "pipelineId", + "in": "path", + "description": "The deployment pipeline ID", "required": true, - "schema": { - "$ref": "#/definitions/RequiredWorkspaces" - } - }, - { - "name": "lineage", - "in": "query", - "description": "Whether to return lineage info (upstream dataflows, tiles, datasource IDs)​", - "required": false, - "type": "boolean" + "type": "string", + "format": "uuid" }, { - "name": "datasourceDetails", - "in": "query", - "description": "Whether to return datasource details​", - "required": false, - "type": "boolean" + "name": "stageOrder", + "in": "path", + "description": "The deployment pipeline stage order. Development (0), Test (1), Production (2).", + "required": true, + "type": "integer", + "format": "int32" } ], "responses": { - "202": { - "description": "Accepted", + "200": { + "description": "OK", "schema": { - "$ref": "#/definitions/ScanRequest" + "$ref": "#/definitions/PipelineStageArtifacts" } } }, "x-ms-examples": { - "Example": { + "Get test stage artifacts": { "parameters": { - "lineage": true, - "datasourceDetails": true, - "requiredWorkspaces": { - "workspaces": [ - "97d03602-4873-4760-b37e-1563ef5358e3", - "67b7e93a-3fb3-493c-9e41-2c5051008f24" - ] - } + "pipelineId": "a5ded933-57b7-41f4-b072-ed4c1f9d5824", + "stageOrder": 1 }, "responses": { - "202": { - "header": "Location", + "200": { "body": { - "id": "e7d03602-4873-4760-b37e-1563ef5358e3", - "createdDateTime": "2020-06-15T16:46:28.0487687Z", - "status": "NotStarted" + "dataflows": [ + { + "artifactId": "527700ab-3cdb-4637-8402-912a129b2a92", + "artifactDisplayName": "Sales Dataflow", + "sourceArtifactId": "29efcfb0-0063-44af-a4ed-6c0bee3417d3", + "lastDeploymentTime ": "2021-06-06T11:55:59.057Z" + } + ], + "datasets": [ + { + "artifactId": "dd3b6aa1-4d40-405c-a19b-48314a27e8ee", + "artifactName": "Sales Dataset", + "sourceArtifactId": "1a201f2a-d1d8-45c0-8c61-1676338517de", + "targetArtifactId": "a5cf347e-7b49-4198-8a2b-0aa92c37d8f8", + "lastDeploymentTime ": "2020-12-13T09:26:41.153Z" + } + ], + "reports": [ + { + "artifactId": "9d5c1f0f-f85c-48f4-8a8e-4c77547116b3", + "artifactName": "Sales Report", + "sourceArtifactId": "2d225191-65f8-4ec3-b77d-06100602b1f7", + "lastDeploymentTime ": "2020-12-13T09:26:41.153Z" + } + ], + "dashboards": [ + { + "artifactId": "9046e4cc-8aea-4a7a-a3b5-1a78b1447d82", + "artifactName": "Sales Dashboard" + } + ] } } } @@ -10739,24 +10907,25 @@ "deprecated": false } }, - "/v1.0/myorg/admin/workspaces/scanStatus/{scanId}": { + "/v1.0/myorg/pipelines/{pipelineId}/operations": { "get": { "tags": [ - "Admin" + "Pipelines" ], - "summary": "Gets scan status for the specified scan. (Preview)", - "description": "**Note:** The user must have administrator rights (such as Microsoft 365 Global Administrator or Power BI Service Administrator) to call this API or authenticate via service principal.
    This API allows a maximum of 10000 requests per hour.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "WorkspaceInfo_GetScanStatus", + "summary": "Returns a list of up to 20 last deploy operations performed on the specified deployment pipeline.", + "description": "
    **Required scope**: Pipeline.ReadWrite.All or Pipeline.Read.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Pipelines_GetPipelineOperations", "consumes": [ - "application/json" + ], "produces": [ "application/json" ], "parameters": [ { - "name": "scanId", + "name": "pipelineId", "in": "path", + "description": "The deployment pipeline ID", "required": true, "type": "string", "format": "uuid" @@ -10766,23 +10935,29 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ScanRequest" + "$ref": "#/definitions/PipelineOperations" } } }, "x-ms-examples": { - "Example": { + "Get pipeline Operations": { "parameters": { - "scanId": "e7d03602-4873-4760-b37e-1563ef5358e3" + "pipelineId": "a5ded933-57b7-41f4-b072-ed4c1f9d5824" }, "responses": { "200": { - "header": "Location", - "body": { - "id": "e7d03602-4873-4760-b37e-1563ef5358e3", - "createdDateTime": "2020-06-15T16:46:28.0487687Z", - "status": "Succeeded" - } + "value": [ + { + "id": "1065e6a3-a020-4c0c-ada7-92b5fe99eec5", + "type": "Deploy", + "status ": "Succeeded", + "lastUpdatedTime": "2020-12-13T09:26:43.153", + "executionStartTime ": "2020-12-13T09:25:43.153Z", + "executionEndTime ": "2020-12-13T09:26:43.153Z", + "sourceStageOrder": 0, + "targetStageOrder": 1 + } + ] } } } @@ -10790,24 +10965,33 @@ "deprecated": false } }, - "/v1.0/myorg/admin/workspaces/scanResult/{scanId}": { + "/v1.0/myorg/pipelines/{pipelineId}/operations/{operationId}": { "get": { "tags": [ - "Admin" + "Pipelines" ], - "summary": "Gets scan result for the specified scan (should be called only after getting status Succeeded in the scan status API). Scan result will be available for up to 24 hours. (Preview)", - "description": "**Note:** The user must have administrator rights (such as Microsoft 365 Global Administrator or Power BI Service Administrator) to call this API or authenticate via service principal.
    This API allows a maximum of 500 requests per hour.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "WorkspaceInfo_GetScanResult", + "summary": "Returns the details of the specified deploy operation performed on the specified deployment pipeline including the `executionPlan`. Use to track the status of the deploy operation.", + "description": "
    **Required scope**: Pipeline.ReadWrite.All or Pipeline.Read.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Pipelines_GetPipelineOperation", "consumes": [ - "application/json" + ], "produces": [ "application/json" ], "parameters": [ { - "name": "scanId", + "name": "pipelineId", + "in": "path", + "description": "The deployment pipeline ID", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "name": "operationId", "in": "path", + "description": "The operation ID", "required": true, "type": "string", "format": "uuid" @@ -10817,128 +11001,67 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/WorkspaceInfoResponse" + "$ref": "#/definitions/PipelineOperation" } } }, "x-ms-examples": { - "Example": { + "Get pipeline operation": { "parameters": { - "scanId": "e7d03602-4873-4760-b37e-1563ef5358e3" + "pipelineId": "a5ded933-57b7-41f4-b072-ed4c1f9d5824", + "operationId": "1065e6a3-a020-4c0c-ada7-92b5fe99eec5" }, "responses": { "200": { "body": { - "workspaces": [ - { - "id": "d507422c-8d6d-4361-ac7a-30074a8cd0a1", - "name": "V2 shared", - "type": "Workspace", - "state": "Active", - "isOnDedicatedCapacity": false, - "reports": [ - { - "id": "c6d072d1-ed20-4b60-8329-16c4b934203b", - "name": "CompositeModelParams-RLS", - "datasetId": "132593c4-bf8d-4548-8f25-1ebb16a1613c", - "createdDateTime": "2020-06-16T08:22:49.14", - "modifiedDateTime": "2020-06-16T08:22:49.14", - "modifiedBy": "john@contoso.com", - "reportType": "PaginatedReport", - "endorsementDetails": { - "endorsement": "Certified", - "certifiedBy": "john@contoso.com" - }, - "sensitivityLabel": { - "labelId": "85b38049-4259-43a2-8feb-244e222d96c0" - } - } - ], - "dashboards": [ - { - "id": "80814ece-9302-49e3-b6bc-bad2f7a86c1a", - "displayName": "CompositeModelParamsDashboard", - "isReadOnly": false, - "tiles": [ - { - "id": "e687cc21-5b32-48f5-8c5e-4b844f190579", - "title": "CompositeModelParamsDashboard", - "reportId": "c6d072d1-ed20-4b60-8329-16c4b934203b", - "datasetId": "132593c4-bf8d-4548-8f25-1ebb16a1613c" - } - ], - "sensitivityLabel": { - "labelId": "d9b9581a-0594-4c39-81c5-91ddf40baeda" - } + "id": "1065e6a3-a020-4c0c-ada7-92b5fe99eec5", + "type": "Deploy", + "status ": "Succeeded", + "lastUpdatedTime": "2020-12-13T09:26:43.153", + "executionStartTime ": "2020-12-13T09:25:43.153Z", + "executionEndTime ": "2020-12-13T09:26:43.153Z", + + "sourceStageOrder": 0, + "targetStageOrder": 1, + + "executionPlan": { + "Steps": [ + { + "index": 0, + "type": "DataflowDeployment", + "status": "Succeeded", + "sourceAndTarget": { + "source": "29efcfb0-0063-44af-a4ed-6c0bee3417d3" } - ], - "datasets": [ - { - "id": "e7e8a355-e77b-4418-a7b8-ae5972fdaa03", - "name": "ExportB", - "tables": [], - "relationships": [], - "configuredBy": "john@contoso.com", - "targetStorageMode": "Abf", - "endorsementDetails": { - "endorsement": "Certified", - "certifiedBy": "john@contoso.com" - }, - "upstreamDataflows": [ - { - "targetDataflowId": "a842dbb1-32ca-46b0-9648-498b2c2d5e38", - "groupId": "b7416115-7421-42c0-b525-1505ce40d2f0" - }, - { - "targetDataflowId": "06898194-2eaf-4122-bacc-133db1f8585d", - "groupId": "7263838d-80d7-4b8d-a1f6-50fc27e74a97" - } - ], - "datasourceUsages": [ - { - "datasourceInstanceId": "c79ad907-df19-43fe-a0f7-d9f365d67070" - } - ], - "sensitivityLabel": { - "labelId": "bf3dc57d-d796-41c0-bbe9-a47f5ee3331e" - } + }, + { + "index": 1, + "type": "DatasetDeployment", + "status ": "Succeeded", + "sourceAndTarget": { + "source": "1a201f2a-d1d8-45c0-8c61-1676338517de", + "target": "dd3b6aa1-4d40-405c-a19b-48314a27e8ee" } - ], - "dataflows": [ - { - "objectId": "a842dbb1-32ca-46b0-9648-498b2c2d5e38", - "name": "Azure SQL", - "description": "Azure SQL dataflow", - "configuredBy": "john@contoso.com", - "modifiedBy": "john@contoso.com", - "modifiedDateTime": "2020-06-16T08:27:47.783Z", - "endorsementDetails": { - "endorsement": "Certified", - "certifiedBy": "john@contoso.com" - }, - "datasourceUsages": [ - { - "datasourceInstanceId": "c79ad907-df19-43fe-a0f7-d9f365d67070" - } - ], - "sensitivityLabel": { - "labelId": "5c9f8c24-2a94-4fd2-a105-9a8b096c5af1" - } + }, + { + "index": 2, + "type": "ReportDeployment", + "status ": "Succeeded", + "sourceAndTarget": { + "source": "2d225191-65f8-4ec3-b77d-06100602b1f7", + "target": "9d5c1f0f-f85c-48f4-8a8e-4c77547116b3" } - ] - } - ], - "datasourceInstances": [ - { - "datasourceType": "Sql", - "connectionDetails": { - "server": "qlserver.database.windows.net", - "database": "dbo.largest_table" }, - "datasourceId": "c79ad907-df19-43fe-a0f7-d9f365d67070", - "gatewayId": "e820592e-f8cf-4a6f-b1ed-566799d29565" - } - ] + { + "index": 3, + "type": "DashboardDeployment", + "status ": "Succeeded", + "sourceAndTarget": { + "source": "9046e4cc-8aea-4a7a-a3b5-1a78b1447d82" + } + } + ] + } } } } @@ -10947,14 +11070,14 @@ "deprecated": false } }, - "/v1.0/myorg/admin/workspaces/modified": { - "get": { + "/v1.0/myorg/pipelines/{pipelineId}/deployAll": { + "post": { "tags": [ - "Admin" + "Pipelines" ], - "summary": "Gets a list of workspace IDs in the organization. When using modifiedSince, returns only the IDs of workspaces that had changed since the time specified in the modifiedSince parameter. If not provided, returns a list of all workspace IDs in the organization. modifiedSince parameter should range from 30 minutes to 30 days ago. Notice changes can take up to 30 minutes to take effect. (Preview)", - "description": "**Note:** The user must have administrator rights (such as Microsoft 365 Global Administrator or Power BI Service Administrator) to call this API or authenticate via service principal.
    This API allows a maximum of 30 requests per hour.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "WorkspaceInfo_GetModifiedWorkspaces", + "summary": "Deploy all supported items from the specified deployment pipeline source stage. To learn more about items that are not supported in deployment pipelines, see [unsupported items](https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#unsupported-items)", + "description": "
    **Note**: To perform this operation, the user must be at least a member on both workpsaces. For more information, see [permissions]([https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#permissions)

    **Required scope**: Pipeline.Deploy
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).

    Limitations

    • You can deploy up to 300 items per request
    ", + "operationId": "Pipelines_DeployAll", "consumes": [ "application/json" ], @@ -10963,35 +11086,56 @@ ], "parameters": [ { - "name": "modifiedSince", - "in": "query", - "description": "Last modified date​ (must be in ISO 8601 compliant UTC format)", - "required": false, + "name": "pipelineId", + "in": "path", + "description": "The deployment pipeline ID", + "required": true, "type": "string", - "format": "date-time" + "format": "uuid" + }, + { + "name": "deployRequest", + "in": "body", + "description": "The deploy request", + "required": true, + "schema": { + "$ref": "#/definitions/DeployAllRequest" + } } ], "responses": { - "200": { - "description": "OK", + "202": { + "description": "Accepted", "schema": { - "$ref": "#/definitions/ModifiedWorkspaces" + "$ref": "#/definitions/PipelineOperation" } } }, "x-ms-examples": { - "Example": { + "Deploy all artifacts from Development stage": { "parameters": { - "modifiedSince": "2020-10-02T05:51:30.0000000Z" + "pipelineId": "a5ded933-57b7-41f4-b072-ed4c1f9d5824", + "deployRequest": { + "sourceStageOrder": 0, + "options": { + "allowOverwriteArtifact": true, + "allowCreateArtifact": true + } + } }, "responses": { "200": { - "body": [ - { - "Id": "3740504d-1f93-42f9-8e9d-c8ba9b787a3b" - }, + "value": [ { - "Id": "19cb346c-9839-4e19-81e6-76364d0b836f" + "id": "1065e6a3-a020-4c0c-ada7-92b5fe99eec5", + "type": "Deploy", + "status ": "NotStarted", + "lastUpdatedTime": "2020-12-13T09:26:43.153", + "executionStartTime ": "2020-12-13T09:25:43.153Z", + "executionEndTime ": "2020-12-13T09:26:43.153Z", + + "sourceStageOrder": 0, + "targetStageOrder": 1 } ] } @@ -11001,138 +11145,290 @@ "deprecated": false } }, - - "/v1.0/myorg/admin/capacities/AssignWorkspaces": { + "/v1.0/myorg/pipelines/{pipelineId}/deploy": { "post": { "tags": [ - "Admin" + "Pipelines" ], - "summary": "Assigns the provided workspaces to the specified capacity.", - "description": "**Note:** The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Capacities_AssignWorkspacesToCapacity", + "summary": "Deploy the specified items from the specified deployment pipeline source stage.", + "description": "**Note**: To perform this operation, the user must be at least a member on both workpsaces. For more information, see [permissions]([https://docs.microsoft.com/power-bi/create-reports/deployment-pipelines-process#permissions)

    **Required scope**: Pipeline.Deploy
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).

    Limitations

    • You can deploy up to 300 items per request
    ", + "operationId": "Pipelines_SelectiveDeploy", "consumes": [ "application/json" ], "produces": [ + "application/json" ], "parameters": [ { - "name": "requestParameters", + "name": "pipelineId", + "in": "path", + "description": "The deployment pipeline ID", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "name": "deployRequest", "in": "body", - "description": "Admin assign workspaces capacity parameters", + "description": "The selective deploy request", "required": true, "schema": { - "$ref": "#/definitions/AssignWorkspacesToCapacityRequest" + "$ref": "#/definitions/SelectiveDeployRequest" } } ], "responses": { - "200": { - "description": "OK" + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/PipelineOperation" + } + } + }, + "x-ms-examples": { + "Deploy specific artifacts from Development stage": { + "parameters": { + "pipelineId": "a5ded933-57b7-41f4-b072-ed4c1f9d5824", + "deployRequest": { + "sourceStageOrder": 0, + "dataflows": [ + { + "sourceId": "29efcfb0-0063-44af-a4ed-6c0bee3417d3" + } + ], + "datasets": [ + { + "sourceId": "1a201f2a-d1d8-45c0-8c61-1676338517de" + } + ], + "reports": [ + { + "sourceId": "2d225191-65f8-4ec3-b77d-06100602b1f7" + } + ], + "dashboards": [ + { + "sourceId": "9046e4cc-8aea-4a7a-a3b5-1a78b1447d82" + }, + { + "sourceId": "7f08923c-8f57-49d6-a010-8335bb9cbd1b" + } + ], + "options": { + "allowOverwriteArtifact": true, + "allowCreateArtifact": true + } + } + }, + "responses": { + "200": { + "value": [ + { + "id": "1065e6a3-a020-4c0c-ada7-92b5fe99eec5", + "type": "Deploy", + "status ": "NotStarted", + "lastUpdatedTime": "2020-12-13T09:26:43.153", + "executionStartTime ": "2020-12-13T09:25:43.153Z", + "executionEndTime ": "2020-12-13T09:26:43.153Z", + + "sourceStageOrder": 0, + "targetStageOrder": 1 + } + ] + } + } } }, "deprecated": false } }, - "/v1.0/myorg/admin/capacities/UnassignWorkspaces": { - "post": { + "/v1.0/myorg/dataflowStorageAccounts": { + "get": { "tags": [ - "Admin" + "DataflowStorageAccounts" ], - "summary": "Unassigns the provided workspaces from capacity.", - "description": "**Note:** The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Capacities_UnassignWorkspacesFromCapacity", + "summary": "Returns a list of dataflow storage accounts the user has access to.", + "description": "
    **Required scope**: StorageAccount.Read.All or StorageAccount.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "DataflowStorageAccounts_GetDataflowStorageAccounts", "consumes": [ - "application/json" ], "produces": [ + "application/json" ], "parameters": [ - { - "name": "requestParameters", - "in": "body", - "description": "Admin assign workspaces to shared capacity parameters", - "required": true, - "schema": { - "$ref": "#/definitions/UnassignWorkspacesCapacityRequest" - } - } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "schema": { + "$ref": "#/definitions/DataflowStorageAccounts" + } + } + }, + "x-ms-examples": { + "example": { + "parameters": {}, + "responses": { + "200": { + "value": [ + { + "id": "d692ae06-708c-485e-9987-06ff0fbdbb1f", + "name": "MyDataflowStorageAccount", + "isEnabled": true + } + ] + } + } } }, "deprecated": false } }, - - "/v1.0/myorg/admin/datasets": { - "get": { + "/v1.0/myorg/groups/{groupId}/AssignToDataflowStorage": { + "post": { "tags": [ - "Admin" + "DataflowStorageAccounts" ], - "summary": "Returns a list of datasets for the organization.", - "description": "**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.
    This API processes each request for 2 seconds, in the mean time other requests will be queued.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Datasets_GetDatasetsAsAdmin", + "summary": "Assigns the specified workspace to the specified dataflow storage account.", + "description": "**Note**: To perform this operation, the user must be an admin on the specified workspace and the Power BI dataflow storage account must be enabled. To unassign the specified workspace from a Power BI dataflow storage account, an empty GUID (00000000-0000-0000-0000-000000000000) should be provided as dataflowStorageId.

    **Required scope**: StorageAccount.ReadWrite.All and Workspace.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Groups_AssignToDataflowStorage", "consumes": [ + "application/json" + ], + "produces": [ + ], + "parameters": [ + { + "name": "groupId", + "in": "path", + "description": "The workspace ID", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "name": "requestParameters", + "in": "body", + "description": "Assign to Power BI dataflow storage account parameters", + "required": true, + "schema": { + "$ref": "#/definitions/AssignToDataflowStorageRequest" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-ms-examples": { + "example": { + "parameters": { + "groupId": "f089354e-8366-4e18-aea3-4cb4a3a50b48", + "requestParameters": { + "dataflowStorageId": "d692ae06-708c-485e-9987-06ff0fbdbb1f" + } + }, + "responses": { + "200": {} + } + } + }, + "deprecated": false + } + }, + "/v1.0/myorg/admin/workspaces/getInfo": { + "post": { + "tags": [ + "Admin" + ], + "summary": "Initiate a call to receive metadata for the requested list of workspaces. (Preview)", + "description": "**Note:** The user must have administrator rights (such as Microsoft 365 Global Administrator or Power BI Service Administrator) to call this API or authenticate via service principal.
    This API allows a maximum of 500 requests per hour, and not more than 16 simultaneously.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "WorkspaceInfo_PostWorkspaceInfo", + "consumes": [ + "application/json" ], "produces": [ "application/json" ], "parameters": [ { - "name": "$filter", + "name": "requiredWorkspaces", + "in": "body", + "description": "Required workspace IDs to get info for", + "required": true, + "schema": { + "$ref": "#/definitions/RequiredWorkspaces" + } + }, + { + "name": "lineage", "in": "query", - "description": "Filters the results, based on a boolean condition", + "description": "Whether to return lineage info (upstream dataflows, tiles, datasource IDs)​", "required": false, - "type": "string" + "type": "boolean" }, { - "name": "$top", + "name": "datasourceDetails", "in": "query", - "description": "Returns only the first n results", + "description": "Whether to return datasource details​", "required": false, - "type": "integer", - "format": "int32" + "type": "boolean" }, { - "name": "$skip", + "name": "datasetSchema", "in": "query", - "description": "Skips the first n results", + "description": "Whether to return dataset schema (Tables, Columns and Measures)​", "required": false, - "type": "integer", - "format": "int32" + "type": "boolean" + }, + { + "name": "datasetExpressions", + "in": "query", + "description": "Whether to return dataset expressions (Dax query and Mashup)​", + "required": false, + "type": "boolean" + }, + { + "name": "getArtifactUsers", + "in": "query", + "description": "Whether to return artifact user details​ (Preview) (Permission level)", + "required": false, + "type": "boolean" } ], "responses": { - "200": { - "description": "OK", + "202": { + "description": "Accepted", "schema": { - "$ref": "#/definitions/Datasets" + "$ref": "#/definitions/ScanRequest" } } }, "x-ms-examples": { "Example": { - "parameters": {}, + "parameters": { + "lineage": true, + "datasourceDetails": true, + "datasetSchema": true, + "datasetExpressions": true, + "requiredWorkspaces": { + "workspaces": [ + "97d03602-4873-4760-b37e-1563ef5358e3", + "67b7e93a-3fb3-493c-9e41-2c5051008f24" + ] + } + }, "responses": { - "200": { + "202": { + "header": "Location", "body": { - "value": [ - { - "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", - "name": "SalesMarketing", - "addRowsAPIEnabled": false, - "configuredBy": "john@contoso.com", - "isRefreshable": true, - "isEffectiveIdentityRequired": false, - "isEffectiveIdentityRolesRequired": false, - "isOnPremGatewayRequired": false - } - ] + "id": "e7d03602-4873-4760-b37e-1563ef5358e3", + "createdDateTime": "2020-06-15T16:46:28.0487687Z", + "status": "NotStarted" } } } @@ -11141,57 +11437,50 @@ "deprecated": false } }, - "/v1.0/myorg/admin/datasets/{datasetId}/datasources": { + "/v1.0/myorg/admin/workspaces/scanStatus/{scanId}": { "get": { "tags": [ "Admin" ], - "summary": "Returns a list of datasources for the specified dataset.", - "description": "**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.
    This API processes each request for 0.5 seconds, in the mean time other requests will be queued.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Datasets_GetDatasourcesAsAdmin", + "summary": "Gets scan status for the specified scan. (Preview)", + "description": "**Note:** The user must have administrator rights (such as Microsoft 365 Global Administrator or Power BI Service Administrator) to call this API or authenticate via service principal.
    This API allows a maximum of 10000 requests per hour.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "WorkspaceInfo_GetScanStatus", "consumes": [ - + "application/json" ], "produces": [ "application/json" ], "parameters": [ { - "name": "datasetId", + "name": "scanId", + "description": "The scan ID, which is included in the response from the workspaces or getInfo API that triggered the scan", "in": "path", "required": true, - "type": "string" + "type": "string", + "format": "uuid" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Datasources" + "$ref": "#/definitions/ScanRequest" } } }, "x-ms-examples": { "Example": { "parameters": { - "datasetId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229" + "scanId": "e7d03602-4873-4760-b37e-1563ef5358e3" }, "responses": { "200": { + "header": "Location", "body": { - "value": [ - { - "name": "301", - "connectionString": "data source=MyServer.database.windows.net;initial catalog=MyDatabase;persist security info=True;encrypt=True;trustservercertificate=False", - "datasourceType": "Sql", - "datasourceId": "16a54ccd-620d-4af3-9197-0b8c779a9a6d", - "gatewayId": "7f1c4e55-544b-403f-b132-da0d3a024674", - "connectionDetails": { - "server": "MyServer.database.windows.net", - "database": "MyDatabase" - } - } - ] + "id": "e7d03602-4873-4760-b37e-1563ef5358e3", + "createdDateTime": "2020-06-15T16:46:28.0487687Z", + "status": "Succeeded" } } } @@ -11200,363 +11489,1820 @@ "deprecated": false } }, - - "/v1.0/myorg/admin/groups": { + "/v1.0/myorg/admin/workspaces/scanResult/{scanId}": { "get": { "tags": [ "Admin" ], - "summary": "Returns a list of workspaces for the organization.", - "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Groups_GetGroupsAsAdmin", + "summary": "Gets scan result for the specified scan (should be called only after getting status Succeeded in the scan status API). Scan result will be available for up to 24 hours. (Preview)", + "description": "**Note:** The user must have administrator rights (such as Microsoft 365 Global Administrator or Power BI Service Administrator) to call this API or authenticate via service principal.
    This API allows a maximum of 500 requests per hour.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "WorkspaceInfo_GetScanResult", "consumes": [ - + "application/json" ], "produces": [ "application/json" ], "parameters": [ { - "name": "$expand", - "in": "query", - "description": "Expands related entities inline, receives a comma-separated list of data types. Supported: users, reports, dashboards, datasets, dataflows, workbooks", - "required": false, - "type": "string" - }, - { - "name": "$filter", - "in": "query", - "description": "Filters the results based on a boolean condition", - "required": false, - "type": "string" - }, - { - "name": "$top", - "in": "query", - "description": "Returns only the first n results. This parameter is mandatory and must be in the range of 1-5000.", + "name": "scanId", + "description": "The scan ID, which is included in the response from the workspaces or getInfo API that triggered the scan", + "in": "path", "required": true, - "minimum": 1, - "maximum": 5000, - "type": "integer", - "format": "int32" - }, - { - "name": "$skip", - "in": "query", - "description": "Skips the first n results. Use with top to fetch results beyond the first 5000.", - "required": false, - "type": "integer", - "format": "int32" + "type": "string", + "format": "uuid" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Groups" + "$ref": "#/definitions/WorkspaceInfoResponse" } } }, "x-ms-examples": { - "Get workspaces with users expanded (only applicable for workspaces in the new workspace experience)": { + "Example": { "parameters": { - "$expand": "users", - "$top": 100 + "scanId": "e7d03602-4873-4760-b37e-1563ef5358e3" }, "responses": { "200": { "body": { - "value": [ + "workspaces": [ { - "id": "e380d1d0-1fa6-460b-9a90-1a5c6b02414c", - "isReadOnly": false, - "isOnDedicatedCapacity": false, - "name": "Sample Group 1", - "description": "Sample group", + "id": "d507422c-8d6d-4361-ac7a-30074a8cd0a1", + "name": "V2 shared", "type": "Workspace", "state": "Active", - "users": [ + "isOnDedicatedCapacity": false, + "reports": [ { - "emailAddress": "john@contoso.com", - "groupUserAccessRight": "Admin" + "id": "c6d072d1-ed20-4b60-8329-16c4b934203b", + "name": "CompositeModelParams-RLS", + "datasetId": "132593c4-bf8d-4548-8f25-1ebb16a1613c", + "createdDateTime": "2020-06-16T08:22:49.14", + "modifiedDateTime": "2020-06-16T08:22:49.14", + "modifiedBy": "john@contoso.com", + "reportType": "PaginatedReport", + "endorsementDetails": { + "endorsement": "Certified", + "certifiedBy": "john@contoso.com" + }, + "sensitivityLabel": { + "labelId": "85b38049-4259-43a2-8feb-244e222d96c0" + }, + "users": [ + { + "displayName": "John Nick", + "emailAddress": "john@contoso.com", + "appUserAccessRight": "ReadExplore", + "identifier": "john@contoso.com", + "graphId": "3fadb6e4-130c-4a8f-aeac-416e38b66756", + "principalType": "User" + } + ] } - ] - }, - { - "id": "183dcf10-47b8-48c4-84aa-f0bf9d5f8fcf", - "isReadOnly": false, - "isOnDedicatedCapacity": false, - "name": "Sample Group 2", - "description": "Deleted sample group", - "type": "Workspace", + ], + "dashboards": [ + { + "id": "80814ece-9302-49e3-b6bc-bad2f7a86c1a", + "displayName": "CompositeModelParamsDashboard", + "isReadOnly": false, + "tiles": [ + { + "id": "e687cc21-5b32-48f5-8c5e-4b844f190579", + "title": "CompositeModelParamsDashboard", + "reportId": "c6d072d1-ed20-4b60-8329-16c4b934203b", + "datasetId": "132593c4-bf8d-4548-8f25-1ebb16a1613c" + } + ], + "sensitivityLabel": { + "labelId": "d9b9581a-0594-4c39-81c5-91ddf40baeda" + }, + "users": [ + { + "displayName": "John Nick", + "emailAddress": "john@contoso.com", + "appUserAccessRight": "ReadExplore", + "identifier": "john@contoso.com", + "graphId": "3fadb6e4-130c-4a8f-aeac-416e38b66756", + "principalType": "User" + } + ] + } + ], + "datasets": [ + { + "id": "e7e8a355-e77b-4418-a7b8-ae5972fdaa03", + "name": "ExportB", + "tables": [ + { + "name": "EIM", + "columns": [ + { + "name": "RowNumber-2662979B-1795-4F74-8F37-6A1BA8059B61", + "dataType": "Int64", + "isHidden": true + } + ], + "measures": [ + { + "name": "MyMeasure", + "expression": "CALCULATE(SELECTEDVALUE('EIM EIMTestToBeDeleted'[Numbers])*10)", + "description": "My measure", + "isHidden": false + } + ], + "isHidden": false, + "description": "My table", + "source": [ + { + "expression": "let\n Source = Sql.Database(\"pbianalytics.database.windows.net\", \"PBIConnectDM\"),\n EIM = Source{[Schema=\"EIM\",Item=\"EIMTestToBeDeleted\"]}[Data]\nin\n EIM" + } + ] + } + ], + "relationships": [], + "configuredBy": "john@contoso.com", + "targetStorageMode": "Abf", + "endorsementDetails": { + "endorsement": "Certified", + "certifiedBy": "john@contoso.com" + }, + "upstreamDataflows": [ + { + "targetDataflowId": "a842dbb1-32ca-46b0-9648-498b2c2d5e38", + "groupId": "b7416115-7421-42c0-b525-1505ce40d2f0" + }, + { + "targetDataflowId": "06898194-2eaf-4122-bacc-133db1f8585d", + "groupId": "7263838d-80d7-4b8d-a1f6-50fc27e74a97" + } + ], + "datasourceUsages": [ + { + "datasourceInstanceId": "c79ad907-df19-43fe-a0f7-d9f365d67070" + } + ], + "sensitivityLabel": { + "labelId": "bf3dc57d-d796-41c0-bbe9-a47f5ee3331e" + }, + "users": [ + { + "displayName": "John Nick", + "emailAddress": "john@contoso.com", + "appUserAccessRight": "ReadExplore", + "identifier": "john@contoso.com", + "graphId": "3fadb6e4-130c-4a8f-aeac-416e38b66756", + "principalType": "User" + } + ] + } + ], + "dataflows": [ + { + "objectId": "a842dbb1-32ca-46b0-9648-498b2c2d5e38", + "name": "Azure SQL", + "description": "Azure SQL dataflow", + "configuredBy": "john@contoso.com", + "modifiedBy": "john@contoso.com", + "modifiedDateTime": "2020-06-16T08:27:47.783Z", + "endorsementDetails": { + "endorsement": "Certified", + "certifiedBy": "john@contoso.com" + }, + "datasourceUsages": [ + { + "datasourceInstanceId": "c79ad907-df19-43fe-a0f7-d9f365d67070" + } + ], + "sensitivityLabel": { + "labelId": "5c9f8c24-2a94-4fd2-a105-9a8b096c5af1" + }, + "users": [ + { + "displayName": "John Nick", + "emailAddress": "john@contoso.com", + "appUserAccessRight": "ReadExplore", + "identifier": "john@contoso.com", + "graphId": "3fadb6e4-130c-4a8f-aeac-416e38b66756", + "principalType": "User" + } + ] + } + ], + "users": [ + { + "displayName": "John Nick", + "emailAddress": "john@contoso.com", + "appUserAccessRight": "ReadExplore", + "identifier": "john@contoso.com", + "graphId": "3fadb6e4-130c-4a8f-aeac-416e38b66756", + "principalType": "User" + } + ] + } + ], + "datasourceInstances": [ + { + "datasourceType": "Sql", + "connectionDetails": { + "server": "qlserver.database.windows.net", + "database": "dbo.largest_table" + }, + "datasourceId": "c79ad907-df19-43fe-a0f7-d9f365d67070", + "gatewayId": "e820592e-f8cf-4a6f-b1ed-566799d29565" + } + ] + } + } + } + } + }, + "deprecated": false + } + }, + "/v1.0/myorg/admin/workspaces/modified": { + "get": { + "tags": [ + "Admin" + ], + "summary": "Gets a list of workspace IDs in the organization. When using modifiedSince, returns only the IDs of workspaces that had changed since the time specified in the modifiedSince parameter. If not provided, returns a list of all workspace IDs in the organization. modifiedSince parameter should range from 30 minutes to 30 days ago. Notice changes can take up to 30 minutes to take effect. (Preview)", + "description": "**Note:** The user must have administrator rights (such as Microsoft 365 Global Administrator or Power BI Service Administrator) to call this API or authenticate via service principal.
    This API allows a maximum of 30 requests per hour.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "WorkspaceInfo_GetModifiedWorkspaces", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "modifiedSince", + "in": "query", + "description": "Last modified date​ (must be in ISO 8601 compliant UTC format)", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "excludePersonalWorkspaces", + "in": "query", + "description": "Whether to exclude personal workspaces​", + "required": false, + "type": "boolean" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ModifiedWorkspaces" + } + } + }, + "x-ms-examples": { + "Example": { + "parameters": { + "modifiedSince": "2020-10-02T05:51:30.0000000Z", + "excludePersonalWorkspaces": true + }, + "responses": { + "200": { + "body": [ + { + "Id": "3740504d-1f93-42f9-8e9d-c8ba9b787a3b" + }, + { + "Id": "19cb346c-9839-4e19-81e6-76364d0b836f" + } + ] + } + } + } + }, + "deprecated": false + } + }, + + "/v1.0/myorg/admin/capacities/AssignWorkspaces": { + "post": { + "tags": [ + "Admin" + ], + "summary": "Assigns the provided workspaces to the specified premium capacity.", + "description": "**Note:** The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Capacities_AssignWorkspacesToCapacity", + "consumes": [ + "application/json" + ], + "produces": [ + ], + "parameters": [ + { + "name": "requestParameters", + "in": "body", + "description": "Admin assign workspaces capacity parameters", + "required": true, + "schema": { + "$ref": "#/definitions/AssignWorkspacesToCapacityRequest" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-ms-examples": { + "Example": { + "parameters": { + "AssignWorkspacesToCapacityRequest": { + "capacityMigrationAssignments": [ + { + "targetCapacityObjectId": "FA5923C2-A23f-4C0B-8345-9BA8645F883E", + "workspacesToAssign": [ "0ebb517c-c6f5-4aa8-9f1d-42bd547e6297" ] + } + ] + } + }, + "responses": { + "200": {} + } + } + }, + "deprecated": false + } + }, + + "/v1.0/myorg/admin/capacities/UnassignWorkspaces": { + "post": { + "tags": [ + "Admin" + ], + "summary": "Unassigns the provided workspaces from capacity.", + "description": "**Note:** The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Capacities_UnassignWorkspacesFromCapacity", + "consumes": [ + "application/json" + ], + "produces": [ + ], + "parameters": [ + { + "name": "requestParameters", + "in": "body", + "description": "Admin assign workspaces to shared capacity parameters", + "required": true, + "schema": { + "$ref": "#/definitions/UnassignWorkspacesCapacityRequest" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "deprecated": false + } + }, + + "/v1.0/myorg/admin/datasets": { + "get": { + "tags": [ + "Admin" + ], + "summary": "Returns a list of datasets for the organization.", + "description": "**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.
    This API processes each request for 2 seconds, in the mean time other requests will be queued.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Datasets_GetDatasetsAsAdmin", + "consumes": [ + + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "$filter", + "in": "query", + "description": "Filters the results, based on a boolean condition", + "required": false, + "type": "string" + }, + { + "name": "$top", + "in": "query", + "description": "Returns only the first n results", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "$skip", + "in": "query", + "description": "Skips the first n results", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Datasets" + } + } + }, + "x-ms-examples": { + "Example": { + "parameters": {}, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "name": "SalesMarketing", + "addRowsAPIEnabled": false, + "configuredBy": "john@contoso.com", + "isRefreshable": true, + "isEffectiveIdentityRequired": false, + "isEffectiveIdentityRolesRequired": false, + "isOnPremGatewayRequired": false + } + ] + } + } + } + } + }, + "deprecated": false + } + }, + "/v1.0/myorg/admin/datasets/{datasetId}/datasources": { + "get": { + "tags": [ + "Admin" + ], + "summary": "Returns a list of datasources for the specified dataset.", + "description": "**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.
    This API processes each request for 0.5 seconds, in the mean time other requests will be queued.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Datasets_GetDatasourcesAsAdmin", + "consumes": [ + + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "datasetId", + "in": "path", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Datasources" + } + } + }, + "x-ms-examples": { + "Example": { + "parameters": { + "datasetId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "301", + "connectionString": "data source=MyServer.database.windows.net;initial catalog=MyDatabase;persist security info=True;encrypt=True;trustservercertificate=False", + "datasourceType": "Sql", + "datasourceId": "16a54ccd-620d-4af3-9197-0b8c779a9a6d", + "gatewayId": "7f1c4e55-544b-403f-b132-da0d3a024674", + "connectionDetails": { + "server": "MyServer.database.windows.net", + "database": "MyDatabase" + } + } + ] + } + } + } + } + }, + "deprecated": false + } + }, + "/v1.0/myorg/admin/datasets/{datasetId}/users": { + "get": { + "tags": [ + "Admin" + ], + "summary": "Returns a list of users that have access to the specified dataset (Preview).", + "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Datasets_GetDatasetUsersAsAdmin", + "consumes": [ + + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "datasetId", + "description": "The dataset ID", + "in": "path", + "required": true, + "type": "string", + "format": "uuid" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/DatasetUsers" + } + } + }, + "x-ms-examples": { + "Example": { + "parameters": {}, + "responses": { + "200": { + "body": { + "value": [ + { + "displayName": "John Nick", + "emailAddress": "john@contoso.com", + "datasetUserAccessRight": "ReadWriteReshareExplore", + "identifier": "john@contoso.com", + "graphId": "3fadb6e4-130c-4a8f-aeac-416e38b66756", + "principalType": "User" + } + ] + } + } + } + } + }, + "deprecated": false + } + }, + + "/v1.0/myorg/admin/groups": { + "get": { + "tags": [ + "Admin" + ], + "summary": "Returns a list of workspaces for the organization.", + "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Groups_GetGroupsAsAdmin", + "consumes": [ + + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "$expand", + "in": "query", + "description": "Expands related entities inline, receives a comma-separated list of data types. Supported: users, reports, dashboards, datasets, dataflows, workbooks", + "required": false, + "type": "string" + }, + { + "name": "$filter", + "in": "query", + "description": "Filters the results based on a boolean condition", + "required": false, + "type": "string" + }, + { + "name": "$top", + "in": "query", + "description": "Returns only the first n results. This parameter is mandatory and must be in the range of 1-5000.", + "required": true, + "minimum": 1, + "maximum": 5000, + "type": "integer", + "format": "int32" + }, + { + "name": "$skip", + "in": "query", + "description": "Skips the first n results. Use with top to fetch results beyond the first 5000.", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Groups" + } + } + }, + "x-ms-examples": { + "Get workspaces with users expanded (only applicable for workspaces in the new workspace experience)": { + "parameters": { + "$expand": "users", + "$top": 100 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "e380d1d0-1fa6-460b-9a90-1a5c6b02414c", + "isReadOnly": false, + "isOnDedicatedCapacity": false, + "name": "Sample Group 1", + "description": "Sample group", + "type": "Workspace", + "state": "Active", + "users": [ + { + "emailAddress": "john@contoso.com", + "groupUserAccessRight": "Admin" + } + ] + }, + { + "id": "183dcf10-47b8-48c4-84aa-f0bf9d5f8fcf", + "isReadOnly": false, + "isOnDedicatedCapacity": false, + "name": "Sample Group 2", + "description": "Deleted sample group", + "type": "Workspace", + "state": "Deleted", + "users": [] + } + ] + } + } + } + }, + "Get orphaned workspaces (only applicable for workspaces in the new workspace experience)": { + "parameters": { + "$expand": "users", + "$top": 100, + "$filter": "(not users/any()) or (not users/any(u: u/groupUserAccessRight eq Microsoft.PowerBI.ServiceContracts.Api.GroupUserAccessRight'Admin'))" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "d5caa808-8c91-400a-911d-06af08dbcc31", + "isReadOnly": false, + "isOnDedicatedCapacity": false, + "name": "Orphaned Group", + "description": "Sample orphan group", + "type": "Workspace", + "state": "Active", + "users": [] + } + ] + } + } + } + }, + "Get workspaces with reports expanded": { + "parameters": { + "$expand": "reports", + "$top": 100, + "skip": 0 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "EC1EE11F-845D-495E-82A3-9DAC2072305A", + "isReadOnly": false, + "isOnDedicatedCapacity": false, + "capacityMigrationStatus": "Migrated", + "description": "cvcv", + "type": "Workspace", + "state": "Active", + "name": "WSv2Test12", + "reports": [] + }, + { + "id": "94E57E92-CEE2-486D-8CC8-218C97200579", + "isReadOnly": false, + "isOnDedicatedCapacity": false, + "capacityMigrationStatus": "Migrated", + "description": "shorter description", + "type": "Workspace", + "state": "Removing", + "name": "a", + "reports": [ + { + "id": "5DBA60B0-D9A7-42AE-B12C-6D9D51E7739A", + "reportType": "PowerBIReport", + "name": "SQlAzure-Refresh", + "datasetId": "8ce96c50-85a0-4db3-85c6-7ccc3ed46523" + }, + { + "id": "197E5C3C-D2F3-42D8-A536-875FB6D7D48C", + "reportType": "PowerBIReport", + "name": "NESGames", + "datasetId": "7d6a4f72-1906-4e08-a469-bd6bc1ab7b69" + } + ] + } + ] + } + } + } + }, + "Get workspaces with dashboards expanded": { + "parameters": { + "$expand": "dashboards", + "$top": 100, + "skip": 0 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "94E57E92-CEE2-486D-8CC8-218C97200579", + "isReadOnly": false, + "isOnDedicatedCapacity": false, + "capacityMigrationStatus": "Migrated", + "description": "shorter description", + "type": "Workspace", + "state": "Removing", + "name": "a", + "dashboards": [ + { + "id": "4668133c-ae3f-42fb-ad7c-214a8623280c", + "displayName": "SQlAzure-Refresh.pbix", + "isReadOnly": false + }, + { + "id": "a8f18ca7-63e8-4220-bc1c-f576ec180b98", + "displayName": "cdvc", + "isReadOnly": false + } + ] + } + ] + } + } + } + }, + "Get workspaces with datasets expanded": { + "parameters": { + "$expand": "datasets", + "$top": 100, + "skip": 0 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "94E57E92-CEE2-486D-8CC8-218C97200579", + "isReadOnly": false, + "isOnDedicatedCapacity": false, + "capacityMigrationStatus": "Migrated", + "description": "shorter description", + "type": "Workspace", + "state": "Removing", + "name": "a", + "datasets": [ + { + "id": "8ce96c50-85a0-4db3-85c6-7ccc3ed46523", + "name": "SQlAzure-Refresh", + "addRowsAPIEnabled": false, + "configuredBy": "admin@granularcontrols.ccsctp.net", + "isRefreshable": true, + "isEffectiveIdentityRequired": false, + "isEffectiveIdentityRolesRequired": false, + "isOnPremGatewayRequired": false, + "targetStorageMode": "Abf", + "createdDate": "2019-04-30T21:35:15.867-07:00", + "ContentProviderType": "PbixInImportMode" + }, + { + "id": "7d6a4f72-1906-4e08-a469-bd6bc1ab7b69", + "name": "NESGames", + "addRowsAPIEnabled": false, + "configuredBy": "admin@granularcontrols.ccsctp.net", + "isRefreshable": true, + "isEffectiveIdentityRequired": false, + "isEffectiveIdentityRolesRequired": false, + "isOnPremGatewayRequired": false, + "targetStorageMode": "Abf", + "createdDate": "2019-04-30T21:35:15.867-07:00", + "ContentProviderType": "PbixInImportMode" + } + ] + } + ] + } + } + } + }, + "Get deleted workspaces (only applicable for workspaces in the new workspace experience)": { + "parameters": { + "$top": 100, + "$filter": "state eq 'Deleted'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "183dcf10-47b8-48c4-84aa-f0bf9d5f8fcf", + "isReadOnly": false, + "isOnDedicatedCapacity": false, + "name": "Sample Group 2", + "description": "Deleted sample group", + "type": "Workspace", + "state": "Deleted" + } + ] + } + } + } + }, + "Get workspaces with datasets expanded (only applicable for workspaces in the new workspace experience)": { + "parameters": { + "$expand": "datasets" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "e380d1d0-1fa6-460b-9a90-1a5c6b02414c", + "isReadOnly": false, + "isOnDedicatedCapacity": false, + "name": "Sample Group 1", + "description": "Sample group", + "type": "Workspace", + "state": "Active", + "datasets": [ + { + "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "name": "SalesMarketing", + "addRowsAPIEnabled": false, + "configuredBy": "john@contoso.com", + "isRefreshable": true, + "isEffectiveIdentityRequired": false, + "isEffectiveIdentityRolesRequired": false, + "isOnPremGatewayRequired": false, + "encryption": { + "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "encryptionStatus": "InSyncWithWorkspace" + } + } + ] + }, + { + "id": "183dcf10-47b8-48c4-84aa-f0bf9d5f8fcf", + "isReadOnly": false, + "isOnDedicatedCapacity": false, + "name": "Sample Group 2", + "description": "Deleted sample group", + "type": "Workspace", "state": "Deleted", - "users": [] + "datasets": [] + } + ] + } + } + } + }, + "Get workspaces with workbooks expanded": { + "parameters": { + "$expand": "workbooks", + "$top": 100, + "skip": 0 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "94E57E92-CEE2-486D-8CC8-218C97200579", + "isReadOnly": false, + "isOnDedicatedCapacity": false, + "description": "shorter description", + "type": "Workspace", + "state": "Removing", + "name": "a", + "workbooks": [ + { + "name": "My Excel sheet", + "datasetId": "8ce96c50-85a0-4db3-85c6-7ccc3ed46523" + } + ] + } + ] + } + } + } + } + }, + "deprecated": false + } + }, + "/v1.0/myorg/admin/groups/{groupId}": { + "patch": { + "tags": [ + "Admin" + ], + "summary": "Updates the specified workspace properties.", + "description": "**Note**: This API is currently limited to updating workspaces in the new workspace experience. Only name and description can be updated, and name must be unique inside an organization. The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Groups_UpdateGroupAsAdmin", + "consumes": [ + + ], + "produces": [ + + ], + "parameters": [ + { + "name": "groupId", + "in": "path", + "required": true, + "description": "The workspace ID", + "type": "string", + "format": "uuid" + }, + { + "name": "groupProperties", + "in": "body", + "required": true, + "description": "The properties to update", + "schema": { + "$ref": "#/definitions/Group" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-ms-examples": { + "Example": { + "parameters": { + "groupId": "e2284830-c8dc-416b-b19a-8cdcd2729332", + "groupProperties": { + "name": "Updated Sales Results", + "description": "Refreshed sales numbers" + } + }, + "responses": { + "200": {} + } + } + }, + "deprecated": false + } + }, + "/v1.0/myorg/admin/groups/{groupId}/users": { + "get": { + "tags": [ + "Admin" + ], + "summary": "Returns a list of users that have access to the specified workspace (Preview).", + "description": "This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Groups_GetGroupUsersAsAdmin", + "consumes": [], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "groupId", + "in": "path", + "description": "The workspace ID", + "required": true, + "type": "string", + "format": "uuid" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/GroupUsers" + } + } + }, + "x-ms-examples": { + "example": { + "parameters": { + "groupId": "f089354e-8366-4e18-aea3-4cb4a3a50b48" + }, + "responses": { + "200": { + "value": [ + { + "displayName": "John Nick", + "emailAddress": "john@contoso.com", + "groupUserAccessRight": "Admin", + "identifier": "john@contoso.com", + "graphId": "3fadb6e4-130c-4a8f-aeac-416e38b66756", + "principalType": "User" + }, + { + "displayName": "Adam Wood", + "emailAddress": "Adam@contoso.com", + "groupUserAccessRight": "Member", + "identifier": "Adam@contoso.com", + "graphId": "785e192c-0f1f-41ca-ae7a-a85da28e565a", + "principalType": "User" + }, + { + "displayName": "ContosoTestApp", + "groupUserAccessRight": "Admin", + "identifier": "3d9b93c6-7b6d-4801-a491-1738910904fd", + "graphId": "3d9b93c6-7b6d-4801-a491-1738910904fd", + "principalType": "App" + } + ] + } + } + } + }, + "deprecated": false + }, + "post": { + "tags": [ + "Admin" + ], + "summary": "Grants user permissions to the specified workspace.", + "description": "**Note:** This API is currently limited to updating workspaces in the new workspace experience and adding user principle only. The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Groups_AddUserAsAdmin", + "consumes": [ + "application/json" + ], + "produces": [ + + ], + "parameters": [ + { + "name": "groupId", + "in": "path", + "description": "The workspace ID", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "name": "userDetails", + "in": "body", + "description": "Details of user access right", + "required": true, + "schema": { + "$ref": "#/definitions/GroupUser" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-ms-examples": { + "Example": { + "parameters": { + "groupId": "206d27ca-94e8-4a69-855b-5c32bdd458a8", + "userDetails": { + "emailAddress": "john@contoso.com", + "groupUserAccessRight": "Admin" + } + }, + "responses": { + "200": {} + } + } + }, + "deprecated": false + } + }, + "/v1.0/myorg/admin/groups/{groupId}/users/{user}": { + "delete": { + "tags": [ + "Admin" + ], + "summary": "Removes user permissions to the specified workspace.", + "description": "**Note:** This API is currently limited to updating workspaces in the new workspace experience and adding user principle only. The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Groups_DeleteUserAsAdmin", + "consumes": [ + + ], + "produces": [ + + ], + "parameters": [ + { + "name": "groupId", + "in": "path", + "required": true, + "description": "The workspace ID", + "type": "string", + "format": "uuid" + }, + { + "name": "user", + "in": "path", + "required": true, + "description": "The user principal name (UPN) of the user to remove (usually the user's email).", + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-ms-examples": { + "Example": { + "parameters": { + "groupId": "f7d76f5a-7190-43c6-bf12-7a135c6c2d69", + "user": "john@contoso.com" + }, + "responses": { + "200": {} + } + } + }, + "deprecated": false + } + }, + "/v1.0/myorg/admin/groups/{groupId}/restore": { + "post": { + "tags": [ + "Admin" + ], + "summary": "Restores a deleted workspace.", + "description": "**Note**: This API is currently limited to restoring workspaces in the new workspace experience. The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.
    This API allows 200 requests per hour at maximum.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Groups_RestoreDeletedGroupAsAdmin", + "consumes": [ + "application/json" + ], + "produces": [ + + ], + "parameters": [ + { + "name": "groupId", + "in": "path", + "description": "The workspace ID", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "name": "groupRestoreRequest", + "in": "body", + "description": "Details of the group restore request", + "required": true, + "schema": { + "$ref": "#/definitions/GroupRestoreRequest" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-ms-examples": { + "Example": { + "parameters": { + "groupId": "3bec11ee-48a9-490c-8e4d-1ebba90d491a", + "groupRestoreRequest": { + "name": "Restored Workspace", + "emailAddress": "john@contoso.com" + } + }, + "responses": { + "200": {} + } + } + }, + "deprecated": false + } + }, + "/v1.0/myorg/admin/groups/{groupId}/dataflows/{dataflowId}/upstreamDataflows": { + "get": { + "tags": [ + "Admin" + ], + "summary": "Returns a list of upstream dataflows for the specified dataflow.", + "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Dataflows_GetUpstreamDataflowsInGroupAsAdmin", + "consumes": [ + + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "groupId", + "in": "path", + "required": true, + "description": "The workspace ID", + "type": "string", + "format": "uuid" + }, + { + "name": "dataflowId", + "in": "path", + "required": true, + "description": "The dataflow ID", + "type": "string", + "format": "uuid" + } + + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/DependentDataflows" + } + } + }, + "x-ms-examples": { + "Example": { + "parameters": { + "groupId": "f089354e-8366-4e18-aea3-4cb4a3a50b48", + "dataflowId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "targetDataflowId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "groupId": "f089354e-8366-4e18-aea3-4cb4a3a50b48" + }, + { + "targetDataflowId": "67a4529b-0cdd-4584-9867-5c0e77d57a2f", + "groupId": "f089354e-8366-4e18-aea3-4cb4a3a50b48" + } + ] + } + } + } + } + }, + "deprecated": false + } + }, + "/v1.0/myorg/admin/groups/{groupId}/dashboards": { + "get": { + "tags": [ + "Admin" + ], + "summary": "Returns a list of dashboards from the specified workspace.", + "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Dashboards_GetDashboardsInGroupAsAdmin", + "consumes": [ + + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "groupId", + "in": "path", + "required": true, + "description": "The workspace ID", + "type": "string", + "format": "uuid" + }, + { + "name": "$filter", + "in": "query", + "description": "Filters the results, based on a boolean condition", + "required": false, + "type": "string" + }, + { + "name": "$top", + "in": "query", + "description": "Returns only the first n results", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "$skip", + "in": "query", + "description": "Skips the first n results", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Dashboards" + } + } + }, + "x-ms-examples": { + "Example": { + "parameters": { + "groupId": "f089354e-8366-4e18-aea3-4cb4a3a50b48" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "69ffaa6c-b36d-4d01-96f5-1ed67c64d4af", + "displayName": "SalesMarketing", + "embedUrl": "https://app.powerbi.com/dashboardEmbed?dashboardId=69ffaa6c-b36d-4d01-96f5-1ed67c64d4af&groupId=f089354e-8366-4e18-aea3-4cb4a3a50b48", + "isReadOnly": false + } + ] + } + } + } + } + }, + "deprecated": false + } + }, + "/v1.0/myorg/admin/groups/{groupId}/reports": { + "get": { + "tags": [ + "Admin" + ], + "summary": "Returns a list of reports from the specified workspace.", + "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Reports_GetReportsInGroupAsAdmin", + "consumes": [ + + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "groupId", + "in": "path", + "required": true, + "description": "The workspace ID", + "type": "string", + "format": "uuid" + }, + { + "name": "$filter", + "in": "query", + "description": "Filters the results, based on a boolean condition", + "required": false, + "type": "string" + }, + { + "name": "$top", + "in": "query", + "description": "Returns only the first n results", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "$skip", + "in": "query", + "description": "Skips the first n results", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Reports" + } + } + }, + "x-ms-examples": { + "Example": { + "parameters": { + "groupId": "f089354e-8366-4e18-aea3-4cb4a3a50b48" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "datasetId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "id": "5b218778-e7a5-4d73-8187-f10824047715", + "name": "SalesMarketing", + "webUrl": "https://app.powerbi.com/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/reports/5b218778-e7a5-4d73-8187-f10824047715", + "embedUrl": "https://app.powerbi.com/reportEmbed?reportId=5b218778-e7a5-4d73-8187-f10824047715&groupId=f089354e-8366-4e18-aea3-4cb4a3a50b48" } ] } } } + } + }, + "deprecated": false + } + }, + "/v1.0/myorg/admin/groups/{groupId}/datasets": { + "get": { + "tags": [ + "Admin" + ], + "summary": "Returns a list of datasets from the specified workspace.", + "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Datasets_GetDatasetsInGroupAsAdmin", + "consumes": [ + + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "groupId", + "in": "path", + "required": true, + "description": "The workspace ID", + "type": "string", + "format": "uuid" + }, + { + "name": "$filter", + "in": "query", + "description": "Filters the results, based on a boolean condition", + "required": false, + "type": "string" + }, + { + "name": "$top", + "in": "query", + "description": "Returns only the first n results", + "required": false, + "type": "integer", + "format": "int32" }, - "Get orphaned workspaces (only applicable for workspaces in the new workspace experience)": { - "parameters": { - "$expand": "users", - "$top": 100, - "$filter": "(not users/any()) or (not users/any(u: u/groupUserAccessRight eq Microsoft.PowerBI.ServiceContracts.Api.GroupUserAccessRight'Admin'))" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "d5caa808-8c91-400a-911d-06af08dbcc31", - "isReadOnly": false, - "isOnDedicatedCapacity": false, - "name": "Orphaned Group", - "description": "Sample orphan group", - "type": "Workspace", - "state": "Active", - "users": [] - } - ] - } - } - } + { + "name": "$skip", + "in": "query", + "description": "Skips the first n results", + "required": false, + "type": "integer", + "format": "int32" }, - "Get workspaces with reports expanded": { + { + "name": "$expand", + "in": "query", + "description": "Expands related entities inline", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Datasets" + } + } + }, + "x-ms-examples": { + "Example": { "parameters": { - "$expand": "reports", - "$top": 100, - "skip": 0 + "groupId": "f089354e-8366-4e18-aea3-4cb4a3a50b48" }, "responses": { "200": { "body": { "value": [ { - "id": "EC1EE11F-845D-495E-82A3-9DAC2072305A", - "isReadOnly": false, - "isOnDedicatedCapacity": false, - "capacityMigrationStatus": "Migrated", - "description": "cvcv", - "type": "Workspace", - "state": "Active", - "name": "WSv2Test12", - "reports": [] - }, - { - "id": "94E57E92-CEE2-486D-8CC8-218C97200579", - "isReadOnly": false, - "isOnDedicatedCapacity": false, - "capacityMigrationStatus": "Migrated", - "description": "shorter description", - "type": "Workspace", - "state": "Removing", - "name": "a", - "reports": [ - { - "id": "5DBA60B0-D9A7-42AE-B12C-6D9D51E7739A", - "reportType": "PowerBIReport", - "name": "SQlAzure-Refresh", - "datasetId": "8ce96c50-85a0-4db3-85c6-7ccc3ed46523" - }, - { - "id": "197E5C3C-D2F3-42D8-A536-875FB6D7D48C", - "reportType": "PowerBIReport", - "name": "NESGames", - "datasetId": "7d6a4f72-1906-4e08-a469-bd6bc1ab7b69" - } - ] + "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "name": "SalesMarketing", + "addRowsAPIEnabled": false, + "configuredBy": "john@contoso.com", + "isRefreshable": true, + "isEffectiveIdentityRequired": false, + "isEffectiveIdentityRolesRequired": false, + "isOnPremGatewayRequired": false } ] } } } }, - "Get workspaces with dashboards expanded": { + "Example with expand on encryption": { "parameters": { - "$expand": "dashboards", - "$top": 100, - "skip": 0 + "groupId": "f089354e-8366-4e18-aea3-4cb4a3a50b48", + "$expand": "encryption" }, "responses": { "200": { "body": { "value": [ { - "id": "94E57E92-CEE2-486D-8CC8-218C97200579", - "isReadOnly": false, - "isOnDedicatedCapacity": false, - "capacityMigrationStatus": "Migrated", - "description": "shorter description", - "type": "Workspace", - "state": "Removing", - "name": "a", - "dashboards": [ - { - "id": "4668133c-ae3f-42fb-ad7c-214a8623280c", - "displayName": "SQlAzure-Refresh.pbix", - "isReadOnly": false - }, - { - "id": "a8f18ca7-63e8-4220-bc1c-f576ec180b98", - "displayName": "cdvc", - "isReadOnly": false - } - ] + "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "name": "SalesMarketing", + "addRowsAPIEnabled": false, + "configuredBy": "john@contoso.com", + "isRefreshable": true, + "isEffectiveIdentityRequired": false, + "isEffectiveIdentityRolesRequired": false, + "isOnPremGatewayRequired": false, + "encryption": { + "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "encryptionStatus": "InSyncWithWorkspace" + } } ] } } } - }, - "Get workspaces with datasets expanded": { + } + }, + "deprecated": false + } + }, + "/v1.0/myorg/admin/groups/{groupId}/datasets/upstreamDataflows": { + "get": { + "tags": [ + "Admin" + ], + "summary": "Returns a list of upstream dataflows for datasets from the specified workspace.", + "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Datasets_GetDatasetToDataflowsLinksInGroupAsAdmin", + "consumes": [ + + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "groupId", + "in": "path", + "required": true, + "description": "The workspace ID", + "type": "string", + "format": "uuid" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/DatasetToDataflowLinksResponse" + } + } + }, + "x-ms-examples": { + "Example": { "parameters": { - "$expand": "datasets", - "$top": 100, - "skip": 0 + "groupId": "f089354e-8366-4e18-aea3-4cb4a3a50b48" }, "responses": { "200": { "body": { "value": [ { - "id": "94E57E92-CEE2-486D-8CC8-218C97200579", - "isReadOnly": false, - "isOnDedicatedCapacity": false, - "capacityMigrationStatus": "Migrated", - "description": "shorter description", - "type": "Workspace", - "state": "Removing", - "name": "a", - "datasets": [ - { - "id": "8ce96c50-85a0-4db3-85c6-7ccc3ed46523", - "name": "SQlAzure-Refresh", - "addRowsAPIEnabled": false, - "configuredBy": "admin@granularcontrols.ccsctp.net", - "isRefreshable": true, - "isEffectiveIdentityRequired": false, - "isEffectiveIdentityRolesRequired": false, - "isOnPremGatewayRequired": false, - "targetStorageMode": "Abf", - "createdDate": "2019-04-30T21:35:15.867-07:00", - "ContentProviderType": "PbixInImportMode" - }, - { - "id": "7d6a4f72-1906-4e08-a469-bd6bc1ab7b69", - "name": "NESGames", - "addRowsAPIEnabled": false, - "configuredBy": "admin@granularcontrols.ccsctp.net", - "isRefreshable": true, - "isEffectiveIdentityRequired": false, - "isEffectiveIdentityRolesRequired": false, - "isOnPremGatewayRequired": false, - "targetStorageMode": "Abf", - "createdDate": "2019-04-30T21:35:15.867-07:00", - "ContentProviderType": "PbixInImportMode" - } - ] + "datasetObjectId": "0d6e2a35-c606-4fb7-8690-1b3a5370a294", + "dataflowObjectId": "4caab73a-2660-4255-8e53-de6745f3d92c", + "workspaceObjectId": "358240c2-b8f3-4817-aa7a-0efa03687a7b" } ] } } } + } + }, + "deprecated": false + } + }, + "/v1.0/myorg/admin/groups/{groupId}/dataflows": { + "get": { + "tags": [ + "Admin" + ], + "summary": "Returns a list of dataflows from the specified workspace.", + "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Dataflows_GetDataflowsInGroupAsAdmin", + "consumes": [ + + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "groupId", + "in": "path", + "required": true, + "description": "The workspace ID", + "type": "string", + "format": "uuid" + }, + { + "name": "$filter", + "in": "query", + "description": "Filters the results, based on a boolean condition", + "required": false, + "type": "string" + }, + { + "name": "$top", + "in": "query", + "description": "Returns only the first n results", + "required": false, + "type": "integer", + "format": "int32" }, - "Get deleted workspaces (only applicable for workspaces in the new workspace experience)": { + { + "name": "$skip", + "in": "query", + "description": "Skips the first n results", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Dataflows" + } + } + }, + "x-ms-examples": { + "Example": { "parameters": { - "$top": 100, - "$filter": "state eq 'Deleted'" + "groupId": "f089354e-8366-4e18-aea3-4cb4a3a50b48" }, "responses": { "200": { "body": { "value": [ { - "id": "183dcf10-47b8-48c4-84aa-f0bf9d5f8fcf", - "isReadOnly": false, - "isOnDedicatedCapacity": false, - "name": "Sample Group 2", - "description": "Deleted sample group", - "type": "Workspace", - "state": "Deleted" + "objectId": "bd32e5c0-363f-430b-a03b-5535a4804b9b", + "name": "AdventureWorks", + "description": "Our Adventure Works", + "modelUrl": "https://MyDataflowStorageAccount.dfs.core.windows.net/powerbi/contoso/AdventureWorks/model.json", + "configuredBy": "john@contoso.com" } ] } } } + } + }, + "deprecated": false + } + }, + + "/v1.0/myorg/admin/reports": { + "get": { + "tags": [ + "Admin" + ], + "summary": "Returns a list of reports for the organization.", + "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Reports_GetReportsAsAdmin", + "consumes": [ + + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "$filter", + "in": "query", + "description": "Filters the results, based on a boolean condition", + "required": false, + "type": "string" }, - "Get workspaces with datasets expanded (only applicable for workspaces in the new workspace experience)": { - "parameters": { - "$expand": "datasets" - }, + { + "name": "$top", + "in": "query", + "description": "Returns only the first n results", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "$skip", + "in": "query", + "description": "Skips the first n results", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Reports" + } + } + }, + "x-ms-examples": { + "Example": { + "parameters": {}, "responses": { "200": { "body": { "value": [ { - "id": "e380d1d0-1fa6-460b-9a90-1a5c6b02414c", - "isReadOnly": false, - "isOnDedicatedCapacity": false, - "name": "Sample Group 1", - "description": "Sample group", - "type": "Workspace", - "state": "Active", - "datasets": [ - { - "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", - "name": "SalesMarketing", - "addRowsAPIEnabled": false, - "configuredBy": "john@contoso.com", - "isRefreshable": true, - "isEffectiveIdentityRequired": false, - "isEffectiveIdentityRolesRequired": false, - "isOnPremGatewayRequired": false, - "encryption": { - "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", - "encryptionStatus": "InSyncWithWorkspace" - } - } - ] - }, - { - "id": "183dcf10-47b8-48c4-84aa-f0bf9d5f8fcf", - "isReadOnly": false, - "isOnDedicatedCapacity": false, - "name": "Sample Group 2", - "description": "Deleted sample group", - "type": "Workspace", - "state": "Deleted", - "datasets": [] + "datasetId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "id": "5b218778-e7a5-4d73-8187-f10824047715", + "name": "SalesMarketing", + "webUrl": "https://app.powerbi.com//reports/5b218778-e7a5-4d73-8187-f10824047715", + "embedUrl": "https://app.powerbi.com/reportEmbed?reportId=5b218778-e7a5-4d73-8187-f10824047715" } ] } } } - }, - "Get workspaces with workbooks expanded": { - "parameters": { - "$expand": "workbooks", - "$top": 100, - "skip": 0 - }, + } + }, + "deprecated": false + } + }, + "/v1.0/myorg/admin/reports/{reportId}/users": { + "get": { + "tags": [ + "Admin" + ], + "summary": "Returns a list of users that have access to the specified report (Preview).", + "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Reports_GetReportUsersAsAdmin", + "consumes": [ + + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "reportId", + "in": "path", + "description": "The report ID", + "required": true, + "type": "string", + "format": "uuid" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ReportUsers" + } + } + }, + "x-ms-examples": { + "Example": { + "parameters": {}, "responses": { "200": { "body": { "value": [ { - "id": "94E57E92-CEE2-486D-8CC8-218C97200579", - "isReadOnly": false, - "isOnDedicatedCapacity": false, - "description": "shorter description", - "type": "Workspace", - "state": "Removing", - "name": "a", - "workbooks": [ - { - "name": "My Excel sheet", - "datasetId": "8ce96c50-85a0-4db3-85c6-7ccc3ed46523" - } - ] + "displayName": "John Nick", + "emailAddress": "john@contoso.com", + "reportUserAccessRight": "Owner", + "identifier": "john@contoso.com", + "graphId": "3fadb6e4-130c-4a8f-aeac-416e38b66756", + "principalType": "User" } ] } @@ -11567,358 +13313,389 @@ "deprecated": false } }, - "/v1.0/myorg/admin/groups/{groupId}": { - "patch": { + + "/v1.0/myorg/admin/dashboards": { + "get": { "tags": [ "Admin" ], - "summary": "Updates the specified workspace properties.", - "description": "**Note**: This API is currently limited to updating workspaces in the new workspace experience. Only name and description can be updated, and name must be unique inside an organization. The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Groups_UpdateGroupAsAdmin", + "summary": "Returns a list of dashboards for the organization.", + "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Dashboards_GetDashboardsAsAdmin", "consumes": [ ], "produces": [ - + "application/json" ], "parameters": [ { - "name": "groupId", - "in": "path", - "required": true, - "description": "The workspace id", - "type": "string", - "format": "uuid" + "name": "$expand", + "in": "query", + "description": "Expands related entities inline, receives a comma-separated list of data types. Supported: tiles", + "required": false, + "type": "string" }, { - "name": "groupProperties", - "in": "body", - "required": true, - "description": "The properties to update", - "schema": { - "$ref": "#/definitions/Group" - } + "name": "$filter", + "in": "query", + "description": "Filters the results, based on a boolean condition", + "required": false, + "type": "string" + }, + { + "name": "$top", + "in": "query", + "description": "Returns only the first n results", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "$skip", + "in": "query", + "description": "Skips the first n results", + "required": false, + "type": "integer", + "format": "int32" } ], "responses": { "200": { - "description": "OK" - } - }, - "x-ms-examples": { - "Example": { - "parameters": { - "groupId": "e2284830-c8dc-416b-b19a-8cdcd2729332", - "groupProperties": { - "name": "Updated Sales Results", - "description": "Refreshed sales numbers" - } - }, + "description": "OK", + "schema": { + "$ref": "#/definitions/Dashboards" + } + } + }, + "x-ms-examples": { + "Example": { + "parameters": {}, "responses": { - "200": {} + "200": { + "body": { + "value": [ + { + "id": "69ffaa6c-b36d-4d01-96f5-1ed67c64d4af", + "displayName": "SalesMarketing", + "embedUrl": "https://app.powerbi.com/dashboardEmbed?dashboardId=69ffaa6c-b36d-4d01-96f5-1ed67c64d4af", + "isReadOnly": false + } + ] + } + } } } }, "deprecated": false } }, - "/v1.0/myorg/admin/groups/{groupId}/users": { - "post": { + "/v1.0/myorg/admin/dashboards/{dashboardId}/tiles": { + "get": { "tags": [ "Admin" ], - "summary": "Grants user permissions to the specified workspace.", - "description": "**Note:** This API is currently limited to updating workspaces in the new workspace experience and adding user principle only. The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Groups_AddUserAsAdmin", + "summary": "Returns a list of tiles within the specified dashboard.", + "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Dashboards_GetTilesAsAdmin", "consumes": [ - "application/json" + ], "produces": [ - + "application/json" ], "parameters": [ { - "name": "groupId", + "name": "dashboardId", + "description": "The dashboard ID", "in": "path", - "description": "The workspace id", "required": true, "type": "string", "format": "uuid" - }, - { - "name": "userDetails", - "in": "body", - "description": "Details of user access right", - "required": true, - "schema": { - "$ref": "#/definitions/GroupUser" - } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "schema": { + "$ref": "#/definitions/Tiles" + } } }, "x-ms-examples": { "Example": { "parameters": { - "groupId": "206d27ca-94e8-4a69-855b-5c32bdd458a8", - "userDetails": { - "emailAddress": "john@contoso.com", - "groupUserAccessRight": "Admin" - } + "dashboardId": "69ffaa6c-b36d-4d01-96f5-1ed67c64d4af" }, "responses": { - "200": {} + "200": { + "body": { + "value": [ + { + "id": "312fbfe9-2eda-44e0-9ed0-ab5dc571bb4b", + "title": "SalesMarketingTile", + "embedUrl": "https://app.powerbi.com/embed?dashboardId=69ffaa6c-b36d-4d01-96f5-1ed67c64d4af&tileId=312fbfe9-2eda-44e0-9ed0-ab5dc571bb4b", + "rowSpan": 0, + "colSpan": 0, + "reportId": "5b218778-e7a5-4d73-8187-f10824047715", + "datasetId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229" + } + ] + } + } } } }, "deprecated": false } }, - "/v1.0/myorg/admin/groups/{groupId}/users/{user}": { - "delete": { + "/v1.0/myorg/admin/dashboards/{dashboardId}/users": { + "get": { "tags": [ "Admin" ], - "summary": "Removes user permissions to the specified workspace.", - "description": "**Note:** This API is currently limited to updating workspaces in the new workspace experience and adding user principle only. The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Groups_DeleteUserAsAdmin", + "summary": "Returns a list of users that have access to the specified dashboard (Preview).", + "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Dashboards_GetDashboardUsersAsAdmin", "consumes": [ ], "produces": [ - + "application/json" ], "parameters": [ { - "name": "groupId", + "name": "dashboardId", + "description": "The dashboard ID", "in": "path", "required": true, - "description": "The workspace id", "type": "string", "format": "uuid" - }, - { - "name": "user", - "in": "path", - "required": true, - "description": "The user principal name (UPN) of the user to remove (usually the user's email).", - "type": "string" } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "schema": { + "$ref": "#/definitions/DashboardUsers" + } } }, "x-ms-examples": { "Example": { - "parameters": { - "groupId": "f7d76f5a-7190-43c6-bf12-7a135c6c2d69", - "user": "john@contoso.com" - }, + "parameters": {}, "responses": { - "200": {} + "200": { + "body": { + "value": [ + { + "displayName": "John Nick", + "emailAddress": "john@contoso.com", + "dashboardUserAccessRight": "Owner", + "identifier": "john@contoso.com", + "graphId": "3fadb6e4-130c-4a8f-aeac-416e38b66756", + "principalType": "User" + } + ] + } + } } } }, "deprecated": false } }, - "/v1.0/myorg/admin/groups/{groupId}/restore": { - "post": { + + "/v1.0/myorg/admin/imports": { + "get": { "tags": [ "Admin" ], - "summary": "Restores a deleted workspace.", - "description": "**Note**: This API is currently limited to restoring workspaces in the new workspace experience. The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.
    This API allows 200 requests per hour at maximum.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Groups_RestoreDeletedGroupAsAdmin", + "summary": "Returns a list of imports for the organization.", + "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Imports_GetImportsAsAdmin", "consumes": [ - "application/json" + ], "produces": [ - + "application/json" ], "parameters": [ { - "name": "groupId", - "in": "path", - "description": "The workspace id", - "required": true, - "type": "string", - "format": "uuid" + "name": "$expand", + "in": "query", + "description": "Expands related entities inline", + "required": false, + "type": "string" }, { - "name": "groupRestoreRequest", - "in": "body", - "description": "Details of the group restore request", - "required": true, - "schema": { - "$ref": "#/definitions/GroupRestoreRequest" - } + "name": "$filter", + "in": "query", + "description": "Filters the results, based on a boolean condition", + "required": false, + "type": "string" + }, + { + "name": "$top", + "in": "query", + "description": "Returns only the first n results", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "$skip", + "in": "query", + "description": "Skips the first n results", + "required": false, + "type": "integer", + "format": "int32" } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "schema": { + "$ref": "#/definitions/Imports" + } } }, "x-ms-examples": { "Example": { - "parameters": { - "groupId": "3bec11ee-48a9-490c-8e4d-1ebba90d491a", - "groupRestoreRequest": { - "name": "Restored Workspace", - "emailAddress": "john@contoso.com" - } - }, + "parameters": {}, "responses": { - "200": {} + "200": { + "body": { + "value": [ + { + "id": "82d9a37a-2b45-4221-b012-cb109b8e30c7", + "importState": "Succeeded", + "createdDateTime": "2018-05-08T14:56:18.477Z", + "updatedDateTime": "2018-05-08T14:56:18.477Z", + "name": "SalesMarketing", + "connectionType": "import", + "source": "Upload", + "datasets": [ + { + "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "name": "SalesMarketing", + "webUrl": "https://app.powerbi.com/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229" + } + ], + "reports": [ + { + "id": "5b218778-e7a5-4d73-8187-f10824047715", + "name": "SalesMarketing", + "webUrl": "https://app.powerbi.com/reports/5b218778-e7a5-4d73-8187-f10824047715", + "embedUrl": "https://app.powerbi.com/reportEmbed?reportId=5b218778-e7a5-4d73-8187-f10824047715" + } + ] + } + ] + } + } } } }, "deprecated": false } }, - "/v1.0/myorg/admin/groups/{groupId}/dataflows/{dataflowId}/upstreamDataflows": { - "get": { + "/v1.0/myorg/admin/tenantKeys": { + "post": { "tags": [ "Admin" ], - "summary": "Returns a list of upstream dataflows for the specified dataflow.", - "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Dataflows_GetUpstreamDataflowsInGroupAsAdmin", + "summary": "Adds an encryption key for Power BI workspaces assigned to a capacity.", + "description": "**Note:** The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.
    This API allows 600 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Admin_AddPowerBIEncryptionKey", "consumes": [ - + "application/json" ], "produces": [ "application/json" ], "parameters": [ { - "name": "groupId", - "in": "path", - "required": true, - "description": "The workspace id", - "type": "string", - "format": "uuid" - }, - { - "name": "dataflowId", - "in": "path", + "name": "tenantKeyCreationRequest", + "in": "body", + "description": "Tenant key information", "required": true, - "description": "The dataflow id", - "type": "string", - "format": "uuid" + "schema": { + "$ref": "#/definitions/TenantKeyCreationRequest" + } } - ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/DependentDataflows" + "$ref": "#/definitions/TenantKey" } } }, "x-ms-examples": { "Example": { "parameters": { - "groupId": "f089354e-8366-4e18-aea3-4cb4a3a50b48", - "dataflowId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229" + "tenantKeyCreationRequest": { + "name": "Contoso Sales", + "keyVaultKeyIdentifier": "https://contoso-vault2.vault.azure.net/keys/ContosoKeyVault/b2ab4ba1c7b341eea5ecaaa2wb54c4d2", + "activate": true, + "isDefault": true + } }, "responses": { "200": { "body": { - "value": [ - { - "targetDataflowId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", - "groupId": "f089354e-8366-4e18-aea3-4cb4a3a50b48" - }, - { - "targetDataflowId": "67a4529b-0cdd-4584-9867-5c0e77d57a2f", - "groupId": "f089354e-8366-4e18-aea3-4cb4a3a50b48" - } - ] + "id": "82d9a37a-2b45-4221-b012-cb109b8e30c7", + "name": "Contoso Sales", + "keyVaultKeyIdentifier": "https://contoso-vault2.vault.azure.net/keys/ContosoKeyVault/b2ab4ba1c7b341eea5ecaaa2wb54c4d2", + "isDefault": true, + "createdAt": "2019-04-30T21:35:15.867-07:00", + "updatedAt": "2019-04-30T21:35:15.867-07:00" } } } } }, "deprecated": false - } - }, - "/v1.0/myorg/admin/groups/{groupId}/dashboards": { + }, "get": { "tags": [ "Admin" ], - "summary": "Returns a list of dashboards from the specified workspace.", - "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Dashboards_GetDashboardsInGroupAsAdmin", + "summary": "Returns the encryption keys for the tenant.", + "description": "**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.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Admin_GetPowerBIEncryptionKeys", "consumes": [ - ], "produces": [ "application/json" ], "parameters": [ - { - "name": "groupId", - "in": "path", - "required": true, - "description": "The workspace id", - "type": "string", - "format": "uuid" - }, - { - "name": "$filter", - "in": "query", - "description": "Filters the results, based on a boolean condition", - "required": false, - "type": "string" - }, - { - "name": "$top", - "in": "query", - "description": "Returns only the first n results", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "$skip", - "in": "query", - "description": "Skips the first n results", - "required": false, - "type": "integer", - "format": "int32" - } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Dashboards" + "$ref": "#/definitions/TenantKeys" } } }, "x-ms-examples": { "Example": { "parameters": { - "groupId": "f089354e-8366-4e18-aea3-4cb4a3a50b48" }, "responses": { "200": { "body": { "value": [ { - "id": "69ffaa6c-b36d-4d01-96f5-1ed67c64d4af", - "displayName": "SalesMarketing", - "embedUrl": "https://app.powerbi.com/dashboardEmbed?dashboardId=69ffaa6c-b36d-4d01-96f5-1ed67c64d4af&groupId=f089354e-8366-4e18-aea3-4cb4a3a50b48", - "isReadOnly": false + "id": "82d9a37a-2b45-4221-b012-cb109b8e30c7", + "name": "Contoso Sales", + "keyVaultKeyIdentifier": "https://contoso-vault2.vault.azure.net/keys/ContosoKeyVault/b2ab4ba1c7b341eea5ecaaa2wb54c4d2", + "isDefault": true, + "createdAt": "2019-04-30T21:35:15.867-07:00", + "updatedAt": "2019-04-30T21:35:15.867-07:00" } ] } @@ -11929,78 +13706,64 @@ "deprecated": false } }, - "/v1.0/myorg/admin/groups/{groupId}/reports": { - "get": { + "/v1.0/myorg/admin/tenantKeys/{tenantKeyId}/Default.Rotate": { + "post": { "tags": [ "Admin" ], - "summary": "Returns a list of reports from the specified workspace.", - "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Reports_GetReportsInGroupAsAdmin", + "summary": "Rotate the encryption key for Power BI workspaces assigned to a capacity.", + "description": "**Note:** The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.
    This API allows 600 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Admin_RotatePowerBIEncryptionKey", "consumes": [ - + "application/json" ], "produces": [ "application/json" ], "parameters": [ { - "name": "groupId", + "name": "tenantKeyId", + "description": "The tenant key ID", "in": "path", "required": true, - "description": "The workspace id", "type": "string", "format": "uuid" }, { - "name": "$filter", - "in": "query", - "description": "Filters the results, based on a boolean condition", - "required": false, - "type": "string" - }, - { - "name": "$top", - "in": "query", - "description": "Returns only the first n results", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "$skip", - "in": "query", - "description": "Skips the first n results", - "required": false, - "type": "integer", - "format": "int32" + "name": "tenantKeyRotationRequest", + "in": "body", + "description": "Tenant key information", + "required": true, + "schema": { + "$ref": "#/definitions/TenantKeyRotationRequest" + } } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Reports" + "$ref": "#/definitions/TenantKey" } } }, "x-ms-examples": { "Example": { "parameters": { - "groupId": "f089354e-8366-4e18-aea3-4cb4a3a50b48" + "tenantKeyId": "82d9a37a-2b45-4221-b012-cb109b8e30c7", + "tenantKeyRotationRequest": { + "keyVaultKeyIdentifier": "https://contoso-vault2.vault.azure.net/keys/ContosoKeyVault/b2ab4ba1c7b341eea5ecaaa2wb54c4d2" + } }, "responses": { "200": { "body": { - "value": [ - { - "datasetId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", - "id": "5b218778-e7a5-4d73-8187-f10824047715", - "name": "SalesMarketing", - "webUrl": "https://app.powerbi.com/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/reports/5b218778-e7a5-4d73-8187-f10824047715", - "embedUrl": "https://app.powerbi.com/reportEmbed?reportId=5b218778-e7a5-4d73-8187-f10824047715&groupId=f089354e-8366-4e18-aea3-4cb4a3a50b48" - } - ] + "id": "82d9a37a-2b45-4221-b012-cb109b8e30c7", + "name": "Contoso Sales", + "keyVaultKeyIdentifier": "https://contoso-vault2.vault.azure.net/keys/ContosoKeyVault/b2ab4ba1c7b341eea5ecaaa2wb54c4d2", + "isDefault": true, + "createdAt": "2019-04-30T21:35:15.867-07:00", + "updatedAt": "2019-04-30T21:35:15.867-07:00" } } } @@ -12009,52 +13772,20 @@ "deprecated": false } }, - "/v1.0/myorg/admin/groups/{groupId}/datasets": { + "/v1.0/myorg/admin/capacities": { "get": { "tags": [ "Admin" ], - "summary": "Returns a list of datasets from the specified workspace.", - "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Datasets_GetDatasetsInGroupAsAdmin", + "summary": "Returns a list of capacities for the organization.", + "description": "**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.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Admin_GetCapacitiesAsAdmin", "consumes": [ - ], "produces": [ "application/json" ], "parameters": [ - { - "name": "groupId", - "in": "path", - "required": true, - "description": "The workspace id", - "type": "string", - "format": "uuid" - }, - { - "name": "$filter", - "in": "query", - "description": "Filters the results, based on a boolean condition", - "required": false, - "type": "string" - }, - { - "name": "$top", - "in": "query", - "description": "Returns only the first n results", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "$skip", - "in": "query", - "description": "Skips the first n results", - "required": false, - "type": "integer", - "format": "int32" - }, { "name": "$expand", "in": "query", @@ -12067,55 +13798,57 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Datasets" + "$ref": "#/definitions/Capacities" } } }, "x-ms-examples": { "Example": { "parameters": { - "groupId": "f089354e-8366-4e18-aea3-4cb4a3a50b48" }, "responses": { "200": { "body": { "value": [ { - "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", - "name": "SalesMarketing", - "addRowsAPIEnabled": false, - "configuredBy": "john@contoso.com", - "isRefreshable": true, - "isEffectiveIdentityRequired": false, - "isEffectiveIdentityRolesRequired": false, - "isOnPremGatewayRequired": false + "id": "0f084df7-c13d-451b-af5f-ed0c466403b2", + "displayName": "MyCapacity", + "admins": [ "john@contoso.com" ], + "sku": "A1", + "state": "Active", + "region": "West Central US", + "capacityUserAccessRight": "Admin", + "tenantKeyId": "82d9a37a-2b45-4221-b012-cb109b8e30c7" } ] } } } }, - "Example with expand on encryption": { + "Example with expand on tenant key": { "parameters": { - "groupId": "f089354e-8366-4e18-aea3-4cb4a3a50b48", - "$expand": "encryption" + "$expand": "tenantKey" }, "responses": { "200": { "body": { "value": [ { - "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", - "name": "SalesMarketing", - "addRowsAPIEnabled": false, - "configuredBy": "john@contoso.com", - "isRefreshable": true, - "isEffectiveIdentityRequired": false, - "isEffectiveIdentityRolesRequired": false, - "isOnPremGatewayRequired": false, - "encryption": { - "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", - "encryptionStatus": "InSyncWithWorkspace" + "id": "0f084df7-c13d-451b-af5f-ed0c466403b2", + "displayName": "MyCapacity", + "admins": [ "john@contoso.com" ], + "sku": "A1", + "state": "Active", + "region": "West Central US", + "capacityUserAccessRight": "Admin", + "tenantKeyId": "82d9a37a-2b45-4221-b012-cb109b8e30c7", + "tenantKey": { + "id": "82d9a37a-2b45-4221-b012-cb109b8e30c7", + "name": "Contoso Sales", + "keyVaultKeyIdentifier": "https://contoso-vault2.vault.azure.net/keys/ContosoKeyVault/b2ab4ba1c7b341eea5ecaaa2wb54c4d2", + "isDefault": true, + "createdAt": "2019-04-30T21:35:15.867-07:00", + "updatedAt": "2019-04-30T21:35:15.867-07:00" } } ] @@ -12127,54 +13860,54 @@ "deprecated": false } }, - "/v1.0/myorg/admin/groups/{groupId}/datasets/upstreamDataflows": { - "get": { + "/v1.0/myorg/admin/capacities/{capacityId}": { + "patch": { "tags": [ "Admin" ], - "summary": "Returns a list of upstream dataflows for datasets from the specified workspace.", - "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Datasets_GetDatasetToDataflowsLinksInGroupAsAdmin", + "summary": "Changes the specific capacity information. Currently, only supports changing the capacity encryption key", + "description": "**Note:** The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Admin_PatchCapacityAsAdmin", "consumes": [ - + "application/json" ], "produces": [ "application/json" ], "parameters": [ { - "name": "groupId", + "name": "capacityId", + "description": "The capacity ID", "in": "path", "required": true, - "description": "The workspace id", "type": "string", "format": "uuid" + }, + { + "name": "capacityPatchRequest", + "in": "body", + "description": "Patch capacity information", + "required": true, + "schema": { + "$ref": "#/definitions/CapacityPatchRequest" + } } ], "responses": { "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/DatasetToDataflowLinksResponse" - } + "description": "OK" } }, "x-ms-examples": { "Example": { "parameters": { - "groupId": "f089354e-8366-4e18-aea3-4cb4a3a50b48" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "datasetObjectId": "0d6e2a35-c606-4fb7-8690-1b3a5370a294", - "dataflowObjectId": "4caab73a-2660-4255-8e53-de6745f3d92c", - "workspaceObjectId": "358240c2-b8f3-4817-aa7a-0efa03687a7b" - } - ] - } + "capacityId": "0f084df7-c13d-451b-af5f-ed0c466403b2", + "capacityPatchRequest": { + "tenantKeyId": "82d9a37a-2b45-4221-b012-cb109b8e30c7" + } + }, + "responses": { + "200": { } } } @@ -12182,121 +13915,81 @@ "deprecated": false } }, - "/v1.0/myorg/admin/groups/{groupId}/dataflows": { + "/v1.0/myorg/admin/capacities/{capacityId}/users": { "get": { "tags": [ "Admin" ], - "summary": "Returns a list of dataflows from the specified workspace.", - "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Dataflows_GetDataflowsInGroupAsAdmin", + "summary": "Returns a list of users that have access to the specified workspace (Preview).", + "description": "**Note:** The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Capacities_GetCapacityUsersAsAdmin", "consumes": [ - + "application/json" ], "produces": [ - "application/json" ], "parameters": [ { - "name": "groupId", + "name": "capacityId", + "description": "The capacity ID", "in": "path", "required": true, - "description": "The workspace id", "type": "string", "format": "uuid" - }, - { - "name": "$filter", - "in": "query", - "description": "Filters the results, based on a boolean condition", - "required": false, - "type": "string" - }, - { - "name": "$top", - "in": "query", - "description": "Returns only the first n results", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "$skip", - "in": "query", - "description": "Skips the first n results", - "required": false, - "type": "integer", - "format": "int32" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Dataflows" - } - } - }, - "x-ms-examples": { - "Example": { - "parameters": { - "groupId": "f089354e-8366-4e18-aea3-4cb4a3a50b48" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "objectId": "bd32e5c0-363f-430b-a03b-5535a4804b9b", - "name": "AdventureWorks", - "description": "Our Adventure Works", - "modelUrl": "https://MyDataflowStorageAccount.dfs.core.windows.net/powerbi/contoso/AdventureWorks/model.json", - "configuredBy": "john@contoso.com" - } - ] - } - } + "$ref": "#/definitions/Refreshables" } } }, "deprecated": false } }, - - "/v1.0/myorg/admin/reports": { + "/v1.0/myorg/admin/capacities/refreshables": { "get": { "tags": [ "Admin" ], - "summary": "Returns a list of reports for the organization.", - "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Reports_GetReportsAsAdmin", + "summary": "Returns a list of refreshables for the organization within a capacity", + "description": "**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.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Admin_GetRefreshables", "consumes": [ - ], "produces": [ "application/json" ], "parameters": [ + { + "name": "$expand", + "in": "query", + "description": "Expands related entities inline, receives a comma-separated list of data types. Supported: capacities and groups", + "required": false, + "type": "string" + }, { "name": "$filter", "in": "query", - "description": "Filters the results, based on a boolean condition", + "description": "Filters the results based on a boolean condition", "required": false, "type": "string" }, { "name": "$top", "in": "query", - "description": "Returns only the first n results", - "required": false, + "description": "Returns only the first n results.", + "required": true, + "minimum": 1, "type": "integer", "format": "int32" }, { "name": "$skip", "in": "query", - "description": "Skips the first n results", + "description": "Skips the first n results. Use with top to fetch results beyond the first 1000.", "required": false, "type": "integer", "format": "int32" @@ -12306,23 +13999,166 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Reports" + "$ref": "#/definitions/Refreshables" } } }, "x-ms-examples": { "Example": { - "parameters": {}, + "parameters": { + }, "responses": { "200": { "body": { "value": [ { - "datasetId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", - "id": "5b218778-e7a5-4d73-8187-f10824047715", + "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", "name": "SalesMarketing", - "webUrl": "https://app.powerbi.com//reports/5b218778-e7a5-4d73-8187-f10824047715", - "embedUrl": "https://app.powerbi.com/reportEmbed?reportId=5b218778-e7a5-4d73-8187-f10824047715" + "kind": "Dataset", + "startTime": "2017-06-13T09:25:43.153Z", + "endTime": "2017-06-19T11:22:32.445Z", + "refreshCount": 22, + "refreshFailures": 0, + "averageDuration": 289.3814, + "medianDuration": 268.6245, + "refreshesPerDay": 11, + "lastRefresh": { + "refreshType": "ViaApi", + "startTime": "2017-06-13T09:25:43.153Z", + "endTime": "2017-06-13T09:31:43.153Z", + "status": "Completed", + "requestId": "9399bb89-25d1-44f8-8576-136d7e9014b1" + }, + "refreshSchedule": { + "days": [ + "Sunday", + "Friday", + "Saturday" + ], + "times": [ + "05:00", + "11:30", + "17:30", + "23:00" + ], + "enabled": true, + "localTimeZoneId": "UTC", + "notifyOption": "MailOnFailure" + }, + "configuredBy": [ + "john@contoso.com" + ] + } + ] + } + } + } + }, + "Get refreshables with capacities and groups expanded": { + "parameters": { + "$expand": "capacity,group" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "name": "SalesMarketing", + "kind": "Dataset", + "startTime": "2017-06-13T09:25:43.153Z", + "endTime": "2017-06-19T11:22:32.445Z", + "refreshCount": 22, + "refreshFailures": 0, + "averageDuration": 289.3814, + "medianDuration": 268.6245, + "refreshesPerDay": 11, + "lastRefresh": { + "refreshType": "ViaApi", + "startTime": "2017-06-13T09:25:43.153Z", + "endTime": "2017-06-13T09:31:43.153Z", + "status": "Completed", + "requestId": "9399bb89-25d1-44f8-8576-136d7e9014b1" + }, + "refreshSchedule": { + "days": [ + "Sunday", + "Friday", + "Saturday" + ], + "times": [ + "05:00", + "11:30", + "17:30", + "23:00" + ], + "enabled": true, + "localTimeZoneId": "UTC", + "notifyOption": "MailOnFailure" + }, + "configuredBy": [ + "john@contoso.com" + ], + "capacity": { + "id": "0f084df7-c13d-451b-af5f-ed0c466403b2", + "displayName": "MyCapacity", + "sku": "A1" + }, + "group": { + "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "name": "SalesMarketing" + } + } + ] + } + } + } + }, + "Get refreshes with an average duration greater than thirty minutes": { + "parameters": { + "$filter": "averageDuration gt 1800" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "name": "SalesMarketing", + "kind": "Dataset", + "startTime": "2017-06-13T09:25:43.153Z", + "endTime": "2017-06-19T11:22:32.445Z", + "refreshCount": 22, + "refreshFailures": 0, + "averageDuration": 3289.3814, + "medianDuration": 2268.6245, + "refreshesPerDay": 11, + "lastRefresh": { + "refreshType": "ViaApi", + "startTime": "2017-06-13T09:25:43.153Z", + "endTime": "2017-06-13T09:58:05.221Z", + "status": "Completed", + "requestId": "9399bb89-25d1-44f8-8576-136d7e9014b1" + }, + "refreshSchedule": { + "days": [ + "Sunday", + "Friday", + "Saturday" + ], + "times": [ + "05:00", + "11:30", + "17:30", + "23:00" + ], + "enabled": true, + "localTimeZoneId": "UTC", + "notifyOption": "MailOnFailure" + }, + "configuredBy": [ + "john@contoso.com" + ] } ] } @@ -12333,48 +14169,55 @@ "deprecated": false } }, - - "/v1.0/myorg/admin/dashboards": { + "/v1.0/myorg/admin/capacities/{capacityId}/refreshables": { "get": { "tags": [ "Admin" ], - "summary": "Returns a list of dashboards for the organization.", - "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Dashboards_GetDashboardsAsAdmin", + "summary": "Returns a list of refreshables for the specified capacity the user has access to", + "description": "**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.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Admin_GetRefreshablesForCapacity", "consumes": [ - ], "produces": [ "application/json" ], "parameters": [ + { + "name": "capacityId", + "description": "The capacity ID", + "in": "path", + "required": true, + "type": "string", + "format": "uuid" + }, { "name": "$expand", "in": "query", - "description": "Expands related entities inline, receives a comma-separated list of data types. Supported: tiles", + "description": "Expands related entities inline, receives a comma-separated list of data types. Supported: capacities and groups", "required": false, "type": "string" }, { "name": "$filter", "in": "query", - "description": "Filters the results, based on a boolean condition", + "description": "Filters the results based on a boolean condition", "required": false, "type": "string" }, { "name": "$top", "in": "query", - "description": "Returns only the first n results", - "required": false, + "description": "Returns only the first n results.", + "required": true, + "minimum": 1, "type": "integer", "format": "int32" }, { "name": "$skip", "in": "query", - "description": "Skips the first n results", + "description": "Skips the first n results. Use with top to fetch results beyond the first 1000.", "required": false, "type": "integer", "format": "int32" @@ -12384,22 +14227,166 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Dashboards" + "$ref": "#/definitions/Refreshables" } } }, "x-ms-examples": { "Example": { - "parameters": {}, + "parameters": { + }, "responses": { "200": { "body": { "value": [ { - "id": "69ffaa6c-b36d-4d01-96f5-1ed67c64d4af", - "displayName": "SalesMarketing", - "embedUrl": "https://app.powerbi.com/dashboardEmbed?dashboardId=69ffaa6c-b36d-4d01-96f5-1ed67c64d4af", - "isReadOnly": false + "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "name": "SalesMarketing", + "kind": "Dataset", + "startTime": "2017-06-13T09:25:43.153Z", + "endTime": "2017-06-19T11:22:32.445Z", + "refreshCount": 22, + "refreshFailures": 0, + "averageDuration": 289.3814, + "medianDuration": 268.6245, + "refreshesPerDay": 11, + "lastRefresh": { + "refreshType": "ViaApi", + "startTime": "2017-06-13T09:25:43.153Z", + "endTime": "2017-06-13T09:31:43.153Z", + "status": "Completed", + "requestId": "9399bb89-25d1-44f8-8576-136d7e9014b1" + }, + "refreshSchedule": { + "days": [ + "Sunday", + "Friday", + "Saturday" + ], + "times": [ + "05:00", + "11:30", + "17:30", + "23:00" + ], + "enabled": true, + "localTimeZoneId": "UTC", + "notifyOption": "MailOnFailure" + }, + "configuredBy": [ + "john@contoso.com" + ] + } + ] + } + } + } + }, + "Get refreshables with capacities and groups expanded": { + "parameters": { + "$expand": "capacity,group" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "name": "SalesMarketing", + "kind": "Dataset", + "startTime": "2017-06-13T09:25:43.153Z", + "endTime": "2017-06-19T11:22:32.445Z", + "refreshCount": 22, + "refreshFailures": 0, + "averageDuration": 289.3814, + "medianDuration": 268.6245, + "refreshesPerDay": 11, + "lastRefresh": { + "refreshType": "ViaApi", + "startTime": "2017-06-13T09:25:43.153Z", + "endTime": "2017-06-13T09:31:43.153Z", + "status": "Completed", + "requestId": "9399bb89-25d1-44f8-8576-136d7e9014b1" + }, + "refreshSchedule": { + "days": [ + "Sunday", + "Friday", + "Saturday" + ], + "times": [ + "05:00", + "11:30", + "17:30", + "23:00" + ], + "enabled": true, + "localTimeZoneId": "UTC", + "notifyOption": "MailOnFailure" + }, + "configuredBy": [ + "john@contoso.com" + ], + "capacity": { + "id": "0f084df7-c13d-451b-af5f-ed0c466403b2", + "displayName": "MyCapacity", + "sku": "A1" + }, + "group": { + "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "name": "SalesMarketing" + } + } + ] + } + } + } + }, + "Get refreshes with an average duration greater than thirty minutes": { + "parameters": { + "$filter": "averageDuration gt 1800" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "name": "SalesMarketing", + "kind": "Dataset", + "startTime": "2017-06-13T09:25:43.153Z", + "endTime": "2017-06-19T11:22:32.445Z", + "refreshCount": 22, + "refreshFailures": 0, + "averageDuration": 3289.3814, + "medianDuration": 2268.6245, + "refreshesPerDay": 11, + "lastRefresh": { + "refreshType": "ViaApi", + "startTime": "2017-06-13T09:25:43.153Z", + "endTime": "2017-06-13T09:58:05.221Z", + "status": "Completed", + "requestId": "9399bb89-25d1-44f8-8576-136d7e9014b1" + }, + "refreshSchedule": { + "days": [ + "Sunday", + "Friday", + "Saturday" + ], + "times": [ + "05:00", + "11:30", + "17:30", + "23:00" + ], + "enabled": true, + "localTimeZoneId": "UTC", + "notifyOption": "MailOnFailure" + }, + "configuredBy": [ + "john@contoso.com" + ] } ] } @@ -12410,55 +14397,156 @@ "deprecated": false } }, - "/v1.0/myorg/admin/dashboards/{dashboardId}/tiles": { + "/v1.0/myorg/admin/capacities/{capacityId}/refreshables/{refreshableId}": { "get": { "tags": [ "Admin" ], - "summary": "Returns a list of tiles within the specified dashboard.", - "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Dashboards_GetTilesAsAdmin", + "summary": "Returns the specified refreshable for the specified capacity the user has access to", + "description": "**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.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Admin_GetRefreshableForCapacity", "consumes": [ - ], "produces": [ "application/json" ], "parameters": [ { - "name": "dashboardId", - "description": "The dashboard id", + "name": "capacityId", + "description": "The capacity ID", "in": "path", "required": true, "type": "string", "format": "uuid" + }, + { + "name": "refreshableId", + "description": "The refreshable ID", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "$expand", + "in": "query", + "description": "Expands related entities inline, receives a comma-separated list of data types. Supported: capacities and groups", + "required": false, + "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Tiles" + "$ref": "#/definitions/Refreshables" } } }, "x-ms-examples": { "Example": { "parameters": { - "dashboardId": "69ffaa6c-b36d-4d01-96f5-1ed67c64d4af" }, "responses": { "200": { "body": { "value": [ { - "id": "312fbfe9-2eda-44e0-9ed0-ab5dc571bb4b", - "title": "SalesMarketingTile", - "embedUrl": "https://app.powerbi.com/embed?dashboardId=69ffaa6c-b36d-4d01-96f5-1ed67c64d4af&tileId=312fbfe9-2eda-44e0-9ed0-ab5dc571bb4b", - "rowSpan": 0, - "colSpan": 0, - "reportId": "5b218778-e7a5-4d73-8187-f10824047715", - "datasetId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229" + "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "name": "SalesMarketing", + "kind": "Dataset", + "startTime": "2017-06-13T09:25:43.153Z", + "endTime": "2017-06-19T11:22:32.445Z", + "refreshCount": 22, + "refreshFailures": 0, + "averageDuration": 289.3814, + "medianDuration": 268.6245, + "refreshesPerDay": 11, + "lastRefresh": { + "refreshType": "ViaApi", + "startTime": "2017-06-13T09:25:43.153Z", + "endTime": "2017-06-13T09:31:43.153Z", + "status": "Completed", + "requestId": "9399bb89-25d1-44f8-8576-136d7e9014b1" + }, + "refreshSchedule": { + "days": [ + "Sunday", + "Friday", + "Saturday" + ], + "times": [ + "05:00", + "11:30", + "17:30", + "23:00" + ], + "enabled": true, + "localTimeZoneId": "UTC", + "notifyOption": "MailOnFailure" + }, + "configuredBy": [ + "john@contoso.com" + ] + } + ] + } + } + } + }, + "Get refreshable with capacity and group expanded": { + "parameters": { + "$expand": "capacity,group" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "name": "SalesMarketing", + "kind": "Dataset", + "startTime": "2017-06-13T09:25:43.153Z", + "endTime": "2017-06-19T11:22:32.445Z", + "refreshCount": 22, + "refreshFailures": 0, + "averageDuration": 289.3814, + "medianDuration": 268.6245, + "refreshesPerDay": 11, + "lastRefresh": { + "refreshType": "ViaApi", + "startTime": "2017-06-13T09:25:43.153Z", + "endTime": "2017-06-13T09:31:43.153Z", + "status": "Completed", + "requestId": "9399bb89-25d1-44f8-8576-136d7e9014b1" + }, + "refreshSchedule": { + "days": [ + "Sunday", + "Friday", + "Saturday" + ], + "times": [ + "05:00", + "11:30", + "17:30", + "23:00" + ], + "enabled": true, + "localTimeZoneId": "UTC", + "notifyOption": "MailOnFailure" + }, + "configuredBy": [ + "john@contoso.com" + ], + "capacity": { + "id": "0f084df7-c13d-451b-af5f-ed0c466403b2", + "displayName": "MyCapacity", + "sku": "A1" + }, + "group": { + "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", + "name": "SalesMarketing" + } } ] } @@ -12469,15 +14557,14 @@ "deprecated": false } }, - - "/v1.0/myorg/admin/imports": { + "/v1.0/myorg/admin/dataflows": { "get": { "tags": [ "Admin" ], - "summary": "Returns a list of imports for the organization.", - "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Imports_GetImportsAsAdmin", + "summary": "Returns a list of dataflows for the organization.", + "description": "**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.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Dataflows_GetDataflowsAsAdmin", "consumes": [ ], @@ -12485,13 +14572,6 @@ "application/json" ], "parameters": [ - { - "name": "$expand", - "in": "query", - "description": "Expands related entities inline", - "required": false, - "type": "string" - }, { "name": "$filter", "in": "query", @@ -12520,7 +14600,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Imports" + "$ref": "#/definitions/Dataflows" } } }, @@ -12532,28 +14612,11 @@ "body": { "value": [ { - "id": "82d9a37a-2b45-4221-b012-cb109b8e30c7", - "importState": "Succeeded", - "createdDateTime": "2018-05-08T14:56:18.477Z", - "updatedDateTime": "2018-05-08T14:56:18.477Z", - "name": "SalesMarketing", - "connectionType": "import", - "source": "Upload", - "datasets": [ - { - "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", - "name": "SalesMarketing", - "webUrl": "https://app.powerbi.com/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229" - } - ], - "reports": [ - { - "id": "5b218778-e7a5-4d73-8187-f10824047715", - "name": "SalesMarketing", - "webUrl": "https://app.powerbi.com/reports/5b218778-e7a5-4d73-8187-f10824047715", - "embedUrl": "https://app.powerbi.com/reportEmbed?reportId=5b218778-e7a5-4d73-8187-f10824047715" - } - ] + "objectId": "bd32e5c0-363f-430b-a03b-5535a4804b9b", + "name": "AdventureWorks", + "description": "Our Adventure Works", + "modelUrl": "https://MyDataflowStorageAccount.dfs.core.windows.net/powerbi/contoso/AdventureWorks/model.json", + "configuredBy": "john@contoso.com" } ] } @@ -12564,255 +14627,89 @@ "deprecated": false } }, - "/v1.0/myorg/admin/tenantKeys": { - "post": { - "tags": [ - "Admin" - ], - "summary": "Adds an encryption key for Power BI workspaces assigned to a capacity.", - "description": "**Note:** The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.
    This API allows 600 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Admin_AddPowerBIEncryptionKey", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "tenantKeyCreationRequest", - "in": "body", - "description": "Tenant key information", - "required": true, - "schema": { - "$ref": "#/definitions/TenantKeyCreationRequest" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/TenantKey" - } - } - }, - "x-ms-examples": { - "Example": { - "parameters": { - "tenantKeyCreationRequest": { - "name": "Contoso Sales", - "keyVaultKeyIdentifier": "https://contoso-vault2.vault.azure.net/keys/ContosoKeyVault/b2ab4ba1c7b341eea5ecaaa2wb54c4d2", - "activate": true, - "isDefault": true - } - }, - "responses": { - "200": { - "body": { - "id": "82d9a37a-2b45-4221-b012-cb109b8e30c7", - "name": "Contoso Sales", - "keyVaultKeyIdentifier": "https://contoso-vault2.vault.azure.net/keys/ContosoKeyVault/b2ab4ba1c7b341eea5ecaaa2wb54c4d2", - "isDefault": true, - "createdAt": "2019-04-30T21:35:15.867-07:00", - "updatedAt": "2019-04-30T21:35:15.867-07:00" - } - } - } - } - }, - "deprecated": false - }, + "/v1.0/myorg/admin/dataflows/{dataflowId}/export": { "get": { "tags": [ "Admin" ], - "summary": "Returns the encryption keys for the tenant.", + "summary": "Exports the specified dataflow definition to a .json file.", "description": "**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.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Admin_GetPowerBIEncryptionKeys", - "consumes": [ - ], - "produces": [ - "application/json" - ], - "parameters": [ - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/TenantKeys" - } - } - }, - "x-ms-examples": { - "Example": { - "parameters": { - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "82d9a37a-2b45-4221-b012-cb109b8e30c7", - "name": "Contoso Sales", - "keyVaultKeyIdentifier": "https://contoso-vault2.vault.azure.net/keys/ContosoKeyVault/b2ab4ba1c7b341eea5ecaaa2wb54c4d2", - "isDefault": true, - "createdAt": "2019-04-30T21:35:15.867-07:00", - "updatedAt": "2019-04-30T21:35:15.867-07:00" - } - ] - } - } - } - } - }, - "deprecated": false - } - }, - "/v1.0/myorg/admin/tenantKeys/{tenantKeyId}/Default.Rotate": { - "post": { - "tags": [ - "Admin" - ], - "summary": "Rotate the encryption key for Power BI workspaces assigned to a capacity.", - "description": "**Note:** The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.
    This API allows 600 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Admin_RotatePowerBIEncryptionKey", - "consumes": [ - "application/json" - ], + "operationId": "Dataflows_ExportDataflowAsAdmin", + "consumes": [], "produces": [ "application/json" ], "parameters": [ { - "name": "tenantKeyId", - "description": "Tenant key id", + "name": "dataflowId", + "description": "The dataflow ID", "in": "path", "required": true, "type": "string", "format": "uuid" - }, - { - "name": "tenantKeyRotationRequest", - "in": "body", - "description": "Tenant key information", - "required": true, - "schema": { - "$ref": "#/definitions/TenantKeyRotationRequest" - } } ], "responses": { "200": { - "description": "OK", + "description": "Exported Json file", "schema": { - "$ref": "#/definitions/TenantKey" - } - } - }, - "x-ms-examples": { - "Example": { - "parameters": { - "tenantKeyId": "82d9a37a-2b45-4221-b012-cb109b8e30c7", - "tenantKeyRotationRequest": { - "keyVaultKeyIdentifier": "https://contoso-vault2.vault.azure.net/keys/ContosoKeyVault/b2ab4ba1c7b341eea5ecaaa2wb54c4d2" - } - }, - "responses": { - "200": { - "body": { - "id": "82d9a37a-2b45-4221-b012-cb109b8e30c7", - "name": "Contoso Sales", - "keyVaultKeyIdentifier": "https://contoso-vault2.vault.azure.net/keys/ContosoKeyVault/b2ab4ba1c7b341eea5ecaaa2wb54c4d2", - "isDefault": true, - "createdAt": "2019-04-30T21:35:15.867-07:00", - "updatedAt": "2019-04-30T21:35:15.867-07:00" - } - } + "type": "file" } } }, "deprecated": false } }, - "/v1.0/myorg/admin/capacities": { + "/v1.0/myorg/admin/dataflows/{dataflowId}/datasources": { "get": { "tags": [ "Admin" ], - "summary": "Returns a list of capacities for the organization.", + "summary": "Returns a list of datasources for the specified dataflow.", "description": "**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.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Admin_GetCapacitiesAsAdmin", + "operationId": "Dataflows_GetDataflowDatasourcesAsAdmin", "consumes": [ + ], "produces": [ "application/json" ], "parameters": [ { - "name": "$expand", - "in": "query", - "description": "Expands related entities inline", - "required": false, - "type": "string" + "name": "dataflowId", + "description": "The dataflow ID", + "in": "path", + "required": true, + "type": "string", + "format": "uuid" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Capacities" + "$ref": "#/definitions/Datasources" } } }, "x-ms-examples": { "Example": { "parameters": { + "dataflowId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229" }, "responses": { "200": { "body": { "value": [ { - "id": "0f084df7-c13d-451b-af5f-ed0c466403b2", - "displayName": "MyCapacity", - "admins": [ "john@contoso.com" ], - "sku": "A1", - "state": "Active", - "region": "West Central US", - "capacityUserAccessRight": "Admin", - "tenantKeyId": "82d9a37a-2b45-4221-b012-cb109b8e30c7" - } - ] - } - } - } - }, - "Example with expand on tenant key": { - "parameters": { - "$expand": "tenantKey" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "0f084df7-c13d-451b-af5f-ed0c466403b2", - "displayName": "MyCapacity", - "admins": [ "john@contoso.com" ], - "sku": "A1", - "state": "Active", - "region": "West Central US", - "capacityUserAccessRight": "Admin", - "tenantKeyId": "82d9a37a-2b45-4221-b012-cb109b8e30c7", - "tenantKey": { - "id": "82d9a37a-2b45-4221-b012-cb109b8e30c7", - "name": "Contoso Sales", - "keyVaultKeyIdentifier": "https://contoso-vault2.vault.azure.net/keys/ContosoKeyVault/b2ab4ba1c7b341eea5ecaaa2wb54c4d2", - "isDefault": true, - "createdAt": "2019-04-30T21:35:15.867-07:00", - "updatedAt": "2019-04-30T21:35:15.867-07:00" + "name": "301", + "connectionString": "data source=MyServer.database.windows.net;initial catalog=MyDatabase;persist security info=True;encrypt=True;trustservercertificate=False", + "datasourceType": "Sql", + "datasourceId": "16a54ccd-620d-4af3-9197-0b8c779a9a6d", + "gatewayId": "7f1c4e55-544b-403f-b132-da0d3a024674", + "connectionDetails": { + "server": "MyServer.database.windows.net", + "database": "MyDatabase" } } ] @@ -12824,54 +14721,55 @@ "deprecated": false } }, - "/v1.0/myorg/admin/capacities/{capacityId}": { - "patch": { + "/v1.0/myorg/admin/dataflows/{dataflowId}/users": { + "get": { "tags": [ "Admin" ], - "summary": "Changes the specific capacity information. Currently, only supports changing the capacity encryption key", - "description": "**Note:** The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Admin_PatchCapacityAsAdmin", + "summary": "Returns a list of users that have access to the specified dataflow (Preview).", + "description": "**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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Dataflows_GetDataflowUsersAsAdmin", "consumes": [ - "application/json" + ], "produces": [ "application/json" ], "parameters": [ { - "name": "capacityId", - "description": "The capacity Id", + "name": "dataflowId", + "description": "The dataflow ID", "in": "path", "required": true, "type": "string", "format": "uuid" - }, - { - "name": "capacityPatchRequest", - "in": "body", - "description": "Patch capacity information", - "required": true, - "schema": { - "$ref": "#/definitions/CapacityPatchRequest" - } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "schema": { + "$ref": "#/definitions/DataflowUsers" + } } }, "x-ms-examples": { "Example": { - "parameters": { - "capacityId": "0f084df7-c13d-451b-af5f-ed0c466403b2", - "capacityPatchRequest": { - "tenantKeyId": "82d9a37a-2b45-4221-b012-cb109b8e30c7" - } - }, + "parameters": {}, "responses": { "200": { + "body": { + "value": [ + { + "displayName": "John Nick", + "emailAddress": "john@contoso.com", + "dataflowUserAccessRight": "ReadWrite", + "identifier": "john@contoso.com", + "graphId": "3fadb6e4-130c-4a8f-aeac-416e38b66756", + "principalType": "User" + } + ] + } } } } @@ -12879,218 +14777,106 @@ "deprecated": false } }, - "/v1.0/myorg/admin/capacities/refreshables": { - "get": { + + "/v1.0/myorg/GenerateToken": { + "post": { "tags": [ - "Admin" + "EmbedToken" ], - "summary": "Returns a list of refreshables for the organization within a capacity", - "description": "**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.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Admin_GetRefreshables", + "summary": "Generates an embed token for multiple reports, datasets and target workspaces. Reports and datasets do not have to be related. The binding of a report to a dataset can be done during embedding. Creating a report can only be done in workspaces specified in *targetWrokspaces*.

    This API is relevant only to ['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).", + "description": "
    **Required scope**:
    • Content.Create - required only if a target workspace is specified in [GenerateTokenRequestV2](/rest/api/power-bi/embedtoken/generatetoken#generatetokenrequestv2)
    • Report.ReadWrite.All or Report.Read.All - required only if a report is specified in [GenerateTokenRequestV2](/rest/api/power-bi/embedtoken/generatetoken#generatetokenrequestv2)
    • Report.ReadWrite.All - required if allowEdit flag is specified for at least one report in [GenerateTokenRequestV2](/rest/api/power-bi/embedtoken/generatetoken#generatetokenrequestv2)
    • Dataset.ReadWrite.All or Dataset.Read.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).
    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.

    Restrictions

    • All the reports and datasets must reside in workspace V2. All the target workpaces must be workspace V2.
    • Maximum number of reports, datasets and target workspaces is 50 each.
    • Generating Embed Token with RLS may not work for AS Azure or AS OnPrem live connection reports for several minutes after a [Rebind](/rest/api/power-bi/reports/RebindReport).
    • Paginated reports are not supported.

    ", + "operationId": "EmbedToken_GenerateToken", "consumes": [ + "application/json" ], "produces": [ "application/json" ], "parameters": [ { - "name": "$expand", - "in": "query", - "description": "Expands related entities inline, receives a comma-separated list of data types. Supported: capacities and groups", - "required": false, - "type": "string" - }, - { - "name": "$filter", - "in": "query", - "description": "Filters the results based on a boolean condition", - "required": false, - "type": "string" - }, - { - "name": "$top", - "in": "query", - "description": "Returns only the first n results.", + "name": "requestParameters", + "description": "Generate token parameters", + "in": "body", "required": true, - "minimum": 1, - "type": "integer", - "format": "int32" - }, - { - "name": "$skip", - "in": "query", - "description": "Skips the first n results. Use with top to fetch results beyond the first 1000.", - "required": false, - "type": "integer", - "format": "int32" + "schema": { + "$ref": "#/definitions/GenerateTokenRequestV2" + } } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Refreshables" + "$ref": "#/definitions/EmbedToken" } } }, "x-ms-examples": { - "Example": { - "parameters": { - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", - "name": "SalesMarketing", - "kind": "Dataset", - "startTime": "2017-06-13T09:25:43.153Z", - "endTime": "2017-06-19T11:22:32.445Z", - "refreshCount": 22, - "refreshFailures": 0, - "averageDuration": 289.3814, - "medianDuration": 268.6245, - "refreshesPerDay": 11, - "lastRefresh": { - "refreshType": "ViaApi", - "startTime": "2017-06-13T09:25:43.153Z", - "endTime": "2017-06-13T09:31:43.153Z", - "status": "Completed", - "requestId": "9399bb89-25d1-44f8-8576-136d7e9014b1" - }, - "refreshSchedule": { - "days": [ - "Sunday", - "Friday", - "Saturday" - ], - "times": [ - "05:00", - "11:30", - "17:30", - "23:00" - ], - "enabled": true, - "localTimeZoneId": "UTC", - "notifyOption": "MailOnFailure" - }, - "configuredBy": [ - "john@contoso.com" - ] - } - ] - } - } - } - }, - "Get refreshables with capacities and groups expanded": { + "Generate EmbedToken for two datasets with RLS identities and a single report with read-only permissions. This token allows to view the report dynamically bound to two different datasets": { "parameters": { - "$expand": "capacity,group" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", - "name": "SalesMarketing", - "kind": "Dataset", - "startTime": "2017-06-13T09:25:43.153Z", - "endTime": "2017-06-19T11:22:32.445Z", - "refreshCount": 22, - "refreshFailures": 0, - "averageDuration": 289.3814, - "medianDuration": 268.6245, - "refreshesPerDay": 11, - "lastRefresh": { - "refreshType": "ViaApi", - "startTime": "2017-06-13T09:25:43.153Z", - "endTime": "2017-06-13T09:31:43.153Z", - "status": "Completed", - "requestId": "9399bb89-25d1-44f8-8576-136d7e9014b1" - }, - "refreshSchedule": { - "days": [ - "Sunday", - "Friday", - "Saturday" - ], - "times": [ - "05:00", - "11:30", - "17:30", - "23:00" - ], - "enabled": true, - "localTimeZoneId": "UTC", - "notifyOption": "MailOnFailure" - }, - "configuredBy": [ - "john@contoso.com" - ], - "capacity": { - "id": "0f084df7-c13d-451b-af5f-ed0c466403b2", - "displayName": "MyCapacity", - "sku": "A1" - }, - "group": { - "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", - "name": "SalesMarketing" - } - } - ] + "requestParameters": { + "datasets": [ + { + "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229" + }, + { + "id": "e75afc47-1150-45e0-aba7-4eb04e4876e5" + } + ], + "reports": [ + { + "id": "b2e49b01-2356-4456-bfb9-3f4c2bc4ddbd" + } + ], + "identities": [ + { + "username": "john@contoso.com", + "roles": [ "sales" ], + "datasets": [ "cfafbeb1-8037-4d0c-896e-a46fb27ff229" ] + }, + { + "username": "iris@contoso.com", + "roles": [ "executive" ], + "datasets": [ "e75afc47-1150-45e0-aba7-4eb04e4876e5" ] + } + ] + } + }, + "responses": { + "200": { + "body": { + "token": "H4sI....AAA=", + "tokenId": "4b76f5ed-5a06-4150-8d1b-60f8e4c186f4", + "expiration": "2028-07-29T17:58:19Z" } } } }, - "Get refreshes with an average duration greater than thirty minutes": { + "Generate EmbedToken for a dataset and two reports. Editing is allowed for only one of the two reports": { "parameters": { - "$filter": "averageDuration gt 1800" + "requestParameters": { + "datasets": [ + { + "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229" + } + ], + "reports": [ + { + "allowEdit": true, + "id": "b2e49b01-2356-4456-bfb9-3f4c2bc4ddbd" + }, + { + "id": "759908bb-ead8-4a43-9645-7ffbf921c68d" + } + ] + } }, "responses": { "200": { "body": { - "value": [ - { - "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", - "name": "SalesMarketing", - "kind": "Dataset", - "startTime": "2017-06-13T09:25:43.153Z", - "endTime": "2017-06-19T11:22:32.445Z", - "refreshCount": 22, - "refreshFailures": 0, - "averageDuration": 3289.3814, - "medianDuration": 2268.6245, - "refreshesPerDay": 11, - "lastRefresh": { - "refreshType": "ViaApi", - "startTime": "2017-06-13T09:25:43.153Z", - "endTime": "2017-06-13T09:58:05.221Z", - "status": "Completed", - "requestId": "9399bb89-25d1-44f8-8576-136d7e9014b1" - }, - "refreshSchedule": { - "days": [ - "Sunday", - "Friday", - "Saturday" - ], - "times": [ - "05:00", - "11:30", - "17:30", - "23:00" - ], - "enabled": true, - "localTimeZoneId": "UTC", - "notifyOption": "MailOnFailure" - }, - "configuredBy": [ - "john@contoso.com" - ] - } - ] + "token": "H4sI....AAA=", + "tokenId": "49ae3742-54c0-4c29-af52-619ff93b5c80", + "expiration": "2018-07-29T17:58:19Z" } } } @@ -13099,226 +14885,177 @@ "deprecated": false } }, - "/v1.0/myorg/admin/capacities/{capacityId}/refreshables": { + "/v1.0/myorg/admin/apps": { "get": { "tags": [ "Admin" ], - "summary": "Returns a list of refreshables for the specified capacity the user has access to", - "description": "**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.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Admin_GetRefreshablesForCapacity", - "consumes": [ - ], + "summary": "Returns a list of apps in the orginization (Preview).", + "description": "This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app). Query parameter $top is mandatory to access this API", + "operationId": "Apps_GetAppsAsAdmin", + "consumes": [], "produces": [ "application/json" ], "parameters": [ - { - "name": "capacityId", - "description": "The capacity id", - "in": "path", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "name": "$expand", - "in": "query", - "description": "Expands related entities inline, receives a comma-separated list of data types. Supported: capacities and groups", - "required": false, - "type": "string" - }, - { - "name": "$filter", - "in": "query", - "description": "Filters the results based on a boolean condition", - "required": false, - "type": "string" - }, { "name": "$top", + "description": "The requested number of entries in the refresh history. If not provided, the default is all available entries.", "in": "query", - "description": "Returns only the first n results.", "required": true, - "minimum": 1, - "type": "integer", - "format": "int32" - }, - { - "name": "$skip", - "in": "query", - "description": "Skips the first n results. Use with top to fetch results beyond the first 1000.", - "required": false, "type": "integer", - "format": "int32" + "minimum": 1 } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Refreshables" + "$ref": "#/definitions/Apps" } } }, "x-ms-examples": { - "Example": { + "example": { "parameters": { + "$top": 10 }, "responses": { "200": { "body": { "value": [ { - "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", - "name": "SalesMarketing", - "kind": "Dataset", - "startTime": "2017-06-13T09:25:43.153Z", - "endTime": "2017-06-19T11:22:32.445Z", - "refreshCount": 22, - "refreshFailures": 0, - "averageDuration": 289.3814, - "medianDuration": 268.6245, - "refreshesPerDay": 11, - "lastRefresh": { - "refreshType": "ViaApi", - "startTime": "2017-06-13T09:25:43.153Z", - "endTime": "2017-06-13T09:31:43.153Z", - "status": "Completed", - "requestId": "9399bb89-25d1-44f8-8576-136d7e9014b1" - }, - "refreshSchedule": { - "days": [ - "Sunday", - "Friday", - "Saturday" - ], - "times": [ - "05:00", - "11:30", - "17:30", - "23:00" - ], - "enabled": true, - "localTimeZoneId": "UTC", - "notifyOption": "MailOnFailure" - }, - "configuredBy": [ - "john@contoso.com" - ] + "id": "f089354e-8366-4e18-aea3-4cb4a3a50b48", + "description": "The finance app", + "name": "Finance", + "publishedBy": "Bill", + "lastUpdate": "2019-01-13T09:46:53.094+02:00" + }, + { + "id": "3d9b93c6-7b6d-4801-a491-1738910904fd", + "description": "The marketing app", + "name": "Marketing", + "publishedBy": "Ben", + "lastUpdate": "2018-11-13T09:46:53.094+02:00" } ] } } } - }, - "Get refreshables with capacities and groups expanded": { - "parameters": { - "$expand": "capacity,group" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", - "name": "SalesMarketing", - "kind": "Dataset", - "startTime": "2017-06-13T09:25:43.153Z", - "endTime": "2017-06-19T11:22:32.445Z", - "refreshCount": 22, - "refreshFailures": 0, - "averageDuration": 289.3814, - "medianDuration": 268.6245, - "refreshesPerDay": 11, - "lastRefresh": { - "refreshType": "ViaApi", - "startTime": "2017-06-13T09:25:43.153Z", - "endTime": "2017-06-13T09:31:43.153Z", - "status": "Completed", - "requestId": "9399bb89-25d1-44f8-8576-136d7e9014b1" - }, - "refreshSchedule": { - "days": [ - "Sunday", - "Friday", - "Saturday" - ], - "times": [ - "05:00", - "11:30", - "17:30", - "23:00" - ], - "enabled": true, - "localTimeZoneId": "UTC", - "notifyOption": "MailOnFailure" - }, - "configuredBy": [ - "john@contoso.com" - ], - "capacity": { - "id": "0f084df7-c13d-451b-af5f-ed0c466403b2", - "displayName": "MyCapacity", - "sku": "A1" - }, - "group": { - "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", - "name": "SalesMarketing" - } - } - ] - } + } + }, + "deprecated": false + } + }, + "/v1.0/myorg/admin/apps/{appId}/users": { + "get": { + "tags": [ + "Admin" + ], + "summary": "Returns a list of users that have access to the specified app (Preview).", + "description": "This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Apps_GetAppUsersAsAdmin", + "consumes": [], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "appId", + "in": "path", + "description": "The app ID", + "required": true, + "type": "string", + "format": "uuid" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/AppUsers" + } + } + }, + "x-ms-examples": { + "example": { + "parameters": { + "appId": "f089354e-8366-4e18-aea3-4cb4a3a50b48" + }, + "responses": { + "200": { + "value": [ + { + "displayName": "John Nick", + "emailAddress": "john@contoso.com", + "appUserAccessRight": "ReadExplore", + "identifier": "john@contoso.com", + "graphId": "3fadb6e4-130c-4a8f-aeac-416e38b66756", + "principalType": "User" + } + ] } } + } + }, + "deprecated": false + } + }, + "/v1.0/myorg/admin/users/{userGraphId}/artifactAccess": { + "get": { + "tags": [ + "Admin" + ], + "summary": "Returns a list of artifacts that the given user have access to (Preview).", + "description": "This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", + "operationId": "Users_GetUserArtifactAccessAsAdmin", + "consumes": [], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "userGraphId", + "in": "path", + "description": "The graph ID of user", + "required": true, + "type": "string", + "format": "uuid" }, - "Get refreshes with an average duration greater than thirty minutes": { + { + "name": "continuationToken", + "in": "query", + "description": "Token required to get the next chunk of the result set", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ArtifactAccessResponse" + } + } + }, + "x-ms-examples": { + "example": { "parameters": { - "$filter": "averageDuration gt 1800" + "userGraphId": "f089354e-8366-4e18-aea3-4cb4a3a50b48" }, "responses": { "200": { "body": { - "value": [ + "artifactAccessEntities": [ { - "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", - "name": "SalesMarketing", - "kind": "Dataset", - "startTime": "2017-06-13T09:25:43.153Z", - "endTime": "2017-06-19T11:22:32.445Z", - "refreshCount": 22, - "refreshFailures": 0, - "averageDuration": 3289.3814, - "medianDuration": 2268.6245, - "refreshesPerDay": 11, - "lastRefresh": { - "refreshType": "ViaApi", - "startTime": "2017-06-13T09:25:43.153Z", - "endTime": "2017-06-13T09:58:05.221Z", - "status": "Completed", - "requestId": "9399bb89-25d1-44f8-8576-136d7e9014b1" - }, - "refreshSchedule": { - "days": [ - "Sunday", - "Friday", - "Saturday" - ], - "times": [ - "05:00", - "11:30", - "17:30", - "23:00" - ], - "enabled": true, - "localTimeZoneId": "UTC", - "notifyOption": "MailOnFailure" - }, - "configuredBy": [ - "john@contoso.com" - ] + "artifactId": "41ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e87", + "displayName": "test report", + "artifactType": "Report", + "accessRight": "ReadWrite" } - ] + ], + "continuationUri": "https://api.powerbi.com/v1.0/myorg/admin/activityevents?continuationToken='%2BRID%3A244SAKlHY7YGAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AAQYAAAAAAAAAFwAAAAAAAAA%3D'", + "continuationToken": "%2BRID%3A244SAKlHY7YGAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AAQYAAAAAAAAAFwAAAAAAAAA%3D" } } } @@ -13327,39 +15064,46 @@ "deprecated": false } }, - "/v1.0/myorg/admin/capacities/{capacityId}/refreshables/{refreshableId}": { + "/v1.0/myorg/admin/activityevents": { "get": { "tags": [ "Admin" ], - "summary": "Returns the specified refreshable for the specified capacity the user has access to", - "description": "**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.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Admin_GetRefreshableForCapacity", + "summary": "Returns a list of audit activity events for a tenant.", + "description": "**Note:** Activity logging isn’t supported for Microsoft Cloud Deutschland. 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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To call this API, provide either a continuation token or both a start and end date time. StartDateTime and EndDateTime must be in the same UTC day and should be wrapped in ''.", + "operationId": "Admin_GetActivityEvents", "consumes": [ + ], "produces": [ "application/json" ], "parameters": [ { - "name": "capacityId", - "description": "The capacity id", - "in": "path", - "required": true, - "type": "string", - "format": "uuid" + "name": "startDateTime", + "in": "query", + "description": "Start date and time of the window for audit event results. Must be in ISO 8601 compliant UTC format.", + "required": false, + "type": "string" }, { - "name": "refreshableId", - "description": "The refreshable id", - "in": "path", - "required": true, + "name": "endDateTime", + "in": "query", + "description": "End date and time of the window for audit event results. Must be in ISO 8601 compliant UTC format.", + "required": false, "type": "string" }, { - "name": "$expand", + "name": "continuationToken", "in": "query", - "description": "Expands related entities inline, receives a comma-separated list of data types. Supported: capacities and groups", + "description": "Token required to get the next chunk of the result set", + "required": false, + "type": "string" + }, + { + "name": "$filter", + "in": "query", + "description": "Filters the results based on a boolean condition, using 'Activity', 'UserId', or both properties. Supports only 'eq' and 'and' operators.", "required": false, "type": "string" } @@ -13368,187 +15112,199 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Refreshables" + "$ref": "#/definitions/ActivityEventResponse" } } }, "x-ms-examples": { - "Example": { + "Get audit activity events between a time window": { "parameters": { + "startDateTime": "'2019-08-13T07:55:00.000Z'", + "endDateTime": "'2019-08-13T08:55:00.000Z'" }, "responses": { "200": { "body": { - "value": [ + "activityEventEntities": [ { - "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", - "name": "SalesMarketing", - "kind": "Dataset", - "startTime": "2017-06-13T09:25:43.153Z", - "endTime": "2017-06-19T11:22:32.445Z", - "refreshCount": 22, - "refreshFailures": 0, - "averageDuration": 289.3814, - "medianDuration": 268.6245, - "refreshesPerDay": 11, - "lastRefresh": { - "refreshType": "ViaApi", - "startTime": "2017-06-13T09:25:43.153Z", - "endTime": "2017-06-13T09:31:43.153Z", - "status": "Completed", - "requestId": "9399bb89-25d1-44f8-8576-136d7e9014b1" - }, - "refreshSchedule": { - "days": [ - "Sunday", - "Friday", - "Saturday" - ], - "times": [ - "05:00", - "11:30", - "17:30", - "23:00" - ], - "enabled": true, - "localTimeZoneId": "UTC", - "notifyOption": "MailOnFailure" - }, - "configuredBy": [ - "john@contoso.com" - ] + "Id": "41ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e87", + "CreationTime": "2019-08-13T07:55:15", + "Operation": "ViewReport", + "OrganizationId": "e43e3248-3d83-44aa-a94d-c836bd7f9b79", + "UserKey": "779438769", + "Activity": "ViewReport", + "Workload": "PowerBI", + "UserId": "john@contoso.com", + "ClientIP": "127.0.0.1" + }, + { + "Id": "c632aa64-70fc-4e80-88f3-9fc2cdcacce8", + "CreationTime": "2019-08-13T07:55:10", + "Operation": "ViewDashboard", + "OrganizationId": "e43e3248-3d83-44aa-a94d-c836bd7f9b79", + "UserKey": "321HK34324", + "Activity": "ViewDashboard", + "Workload": "PowerBI", + "UserId": "john@contoso.com", + "ClientIP": "131.107.160.240" + } + ], + "continuationUri": "https://api.powerbi.com/v1.0/myorg/admin/activityevents?continuationToken='%2BRID%3A244SAKlHY7YGAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AAQYAAAAAAAAAFwAAAAAAAAA%3D'", + "continuationToken": "%2BRID%3A244SAKlHY7YGAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AAQYAAAAAAAAAFwAAAAAAAAA%3D" + } + } + } + }, + "Get audit activity events between a time window and with a specific activity type": { + "parameters": { + "startDateTime": "'2019-08-13T07:55:00.000Z'", + "endDateTime": "'2019-08-13T08:55:00.000Z'", + "$filter": "Activity eq 'ViewReport'" + }, + "responses": { + "200": { + "body": { + "activityEventEntities": [ + { + "Id": "41ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e87", + "CreationTime": "2019-08-13T07:55:15", + "Operation": "ViewReport", + "OrganizationId": "e43e3248-3d83-44aa-a94d-c836bd7f9b79", + "UserKey": "123456", + "Activity": "ViewReport", + "Workload": "PowerBI", + "UserId": "john@contoso.com", + "ClientIP": "127.0.0.1" + }, + { + "Id": "c632aa64-70fc-4e80-88f3-9fc2cdcacce8", + "CreationTime": "2019-08-13T07:55:10", + "Operation": "ViewReport", + "OrganizationId": "e43e3248-3d83-44aa-a94d-c836bd7f9b79", + "UserKey": "42343KJK53K45J", + "Activity": "ViewReport", + "Workload": "PowerBI", + "UserId": "john@contoso.com", + "ClientIP": "131.107.160.240" + } + ], + "continuationUri": "https://api.powerbi.com/v1.0/myorg/admin/activityevents?continuationToken='%2BRID%3A244SAKlHY7YQAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AARAAAAAAAAAAFwAAAAAAAAA%3D'&$filter=Activity eq 'ViewReport'", + "continuationToken": "%2BRID%3A244SAKlHY7YQAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AARAAAAAAAAAAFwAAAAAAAAA%3D" + } + } + } + }, + "Get audit activity events within a time window for a specific user ID": { + "parameters": { + "startDateTime": "'2019-08-13T07:55:00.000Z'", + "endDateTime": "'2019-08-13T08:55:00.000Z'", + "$filter": "UserId eq 'john@contoso.com'" + }, + "responses": { + "200": { + "body": { + "activityEventEntities": [ + { + "Id": "41ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e87", + "CreationTime": "2019-08-13T07:55:15", + "Operation": "ViewReport", + "OrganizationId": "e43e3248-3d83-44aa-a94d-c836bd7f9b79", + "UserKey": "123456", + "Activity": "ViewReport", + "Workload": "PowerBI", + "UserId": "john@contoso.com", + "ClientIP": "127.0.0.1" + }, + { + "Id": "c632aa64-70fc-4e80-88f3-9fc2cdcacce8", + "CreationTime": "2019-08-13T07:55:10", + "Operation": "ViewReport", + "OrganizationId": "e43e3248-3d83-44aa-a94d-c836bd7f9b79", + "UserKey": "42343KJK53K45J", + "Activity": "ViewReport", + "Workload": "PowerBI", + "UserId": "john@contoso.com", + "ClientIP": "131.107.160.240" } - ] + ], + "continuationUri": "https://api.powerbi.com/v1.0/myorg/admin/activityevents?continuationToken='%2BRID%3A244SAKlHY7YQAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AARAAAAAAAAAAFwAAAAAAAAA%3D'&$filter=Activity eq 'ViewReport'", + "continuationToken": "%2BRID%3A244SAKlHY7YQAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AARAAAAAAAAAAFwAAAAAAAAA%3D" } } } }, - "Get refreshable with capacity and group expanded": { + "Get audit activity events within a time window for a specific activity type and user ID": { "parameters": { - "$expand": "capacity,group" + "startDateTime": "'2019-08-13T07:55:00.000Z'", + "endDateTime": "'2019-08-13T08:55:00.000Z'", + "$filter": "Activity eq 'viewreport' and UserId eq 'john@contoso.com'" }, "responses": { "200": { "body": { - "value": [ + "activityEventEntities": [ { - "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", - "name": "SalesMarketing", - "kind": "Dataset", - "startTime": "2017-06-13T09:25:43.153Z", - "endTime": "2017-06-19T11:22:32.445Z", - "refreshCount": 22, - "refreshFailures": 0, - "averageDuration": 289.3814, - "medianDuration": 268.6245, - "refreshesPerDay": 11, - "lastRefresh": { - "refreshType": "ViaApi", - "startTime": "2017-06-13T09:25:43.153Z", - "endTime": "2017-06-13T09:31:43.153Z", - "status": "Completed", - "requestId": "9399bb89-25d1-44f8-8576-136d7e9014b1" - }, - "refreshSchedule": { - "days": [ - "Sunday", - "Friday", - "Saturday" - ], - "times": [ - "05:00", - "11:30", - "17:30", - "23:00" - ], - "enabled": true, - "localTimeZoneId": "UTC", - "notifyOption": "MailOnFailure" - }, - "configuredBy": [ - "john@contoso.com" - ], - "capacity": { - "id": "0f084df7-c13d-451b-af5f-ed0c466403b2", - "displayName": "MyCapacity", - "sku": "A1" - }, - "group": { - "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", - "name": "SalesMarketing" - } + "Id": "41ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e87", + "CreationTime": "2019-08-13T07:55:15", + "Operation": "ViewReport", + "OrganizationId": "e43e3248-3d83-44aa-a94d-c836bd7f9b79", + "UserKey": "123456", + "Activity": "ViewReport", + "Workload": "PowerBI", + "UserId": "john@contoso.com", + "ClientIP": "127.0.0.1" + }, + { + "Id": "c632aa64-70fc-4e80-88f3-9fc2cdcacce8", + "CreationTime": "2019-08-13T07:55:10", + "Operation": "ViewReport", + "OrganizationId": "e43e3248-3d83-44aa-a94d-c836bd7f9b79", + "UserKey": "42343KJK53K45J", + "Activity": "ViewReport", + "Workload": "PowerBI", + "UserId": "john@contoso.com", + "ClientIP": "131.107.160.240" } - ] + ], + "continuationUri": "https://api.powerbi.com/v1.0/myorg/admin/activityevents?continuationToken='%2BRID%3A244SAKlHY7YQAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AARAAAAAAAAAAFwAAAAAAAAA%3D'&$filter=Activity eq 'ViewReport'", + "continuationToken": "%2BRID%3A244SAKlHY7YQAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AARAAAAAAAAAAFwAAAAAAAAA%3D" } } } - } - }, - "deprecated": false - } - }, - "/v1.0/myorg/admin/dataflows": { - "get": { - "tags": [ - "Admin" - ], - "summary": "Returns a list of dataflows for the organization.", - "description": "**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.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Dataflows_GetDataflowsAsAdmin", - "consumes": [ - - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "$filter", - "in": "query", - "description": "Filters the results, based on a boolean condition", - "required": false, - "type": "string" - }, - { - "name": "$top", - "in": "query", - "description": "Returns only the first n results", - "required": false, - "type": "integer", - "format": "int32" }, - { - "name": "$skip", - "in": "query", - "description": "Skips the first n results", - "required": false, - "type": "integer", - "format": "int32" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Dataflows" - } - } - }, - "x-ms-examples": { - "Example": { - "parameters": {}, + "Get the next set of audit activity events by sending the continuation token to the API": { + "parameters": { + "continuationToken": "%2BRID%3A244SAKlHY7YQAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AARAAAAAAAAAAFwAAAAAAAAA%3D" + }, "responses": { "200": { "body": { - "value": [ + "activityEventEntities": [ { - "objectId": "bd32e5c0-363f-430b-a03b-5535a4804b9b", - "name": "AdventureWorks", - "description": "Our Adventure Works", - "modelUrl": "https://MyDataflowStorageAccount.dfs.core.windows.net/powerbi/contoso/AdventureWorks/model.json", - "configuredBy": "john@contoso.com" + "Id": "91ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e87", + "CreationTime": "2019-08-13T08:55:15", + "Operation": "ViewReport", + "OrganizationId": "d43e3248-3d83-44aa-a94d-c836bd7f9b79", + "UserKey": "1236", + "Activity": "ViewReport", + "Workload": "PowerBI", + "UserId": "john@contoso.com", + "ClientIP": "127.0.0.1" + }, + { + "Id": "g632bb64-70fc-4e80-88f3-9fc2cdcacce8", + "CreationTime": "2019-08-13T09:55:10", + "Operation": "ViewReport", + "OrganizationId": "e43e3248-3d83-44aa-a94d-c836bd7f9b79", + "UserKey": "42343KJK55J", + "Activity": "ViewReport", + "Workload": "PowerBI", + "UserId": "john@contoso.com", + "ClientIP": "131.107.160.240" } - ] + ], + "continuationUri": "https://api.powerbi.com/v1.0/myorg/admin/activityevents?continuationToken='%2BRID%$4Z244SAKlHY7YQAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AARAAAAAAAAAAFwAAAAAAAAA%3D'", + "continuationToken": "%2BRID%$4Z244SAKlHY7YQAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AARAAAAAAAAAAFwAAAAAAAAA%3D" } } } @@ -13557,90 +15313,104 @@ "deprecated": false } }, - "/v1.0/myorg/admin/dataflows/{dataflowId}/export": { - "get": { - "tags": [ - "Admin" - ], - "summary": "Exports the specified dataflow definition to a .json file.", - "description": "**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.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Dataflows_ExportDataflowAsAdmin", - "consumes": [], - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "dataflowId", - "description": "The dataflow id", - "in": "path", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "200": { - "description": "Exported Json file", - "schema": { - "type": "file" - } - } - }, - "deprecated": false - } - }, - "/v1.0/myorg/admin/dataflows/{dataflowId}/datasources": { - "get": { + "/v1.0/myorg/admin/informationprotection/removeLabels": { + "post": { "tags": [ "Admin" ], - "summary": "Returns a list of datasources for the specified dataflow.", - "description": "**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.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).", - "operationId": "Dataflows_GetDataflowDatasourcesAsAdmin", + "summary": "Remove sensitivity labels from artifacts by artifact ID.", + "description": "**Note:** The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.
    The admin user must have sufficient [usage rights](https://go.microsoft.com/fwlink/?linkid=2157685) to delete labels.
    This API allows a maximum of 25 requests per hour. Each request can update up to 2000 artifacts.

    **Required scope**: Tenant.ReadWrite.All

    **Usage sample**: [Set or remove sensitivity labels using Power BI REST admin APIs](https://docs.microsoft.com/power-bi/admin/service-security-sensitivity-label-inheritance-set-remove-api)", + "operationId": "InformationProtection_RemoveLabelsAsAdmin", "consumes": [ - + "application/json" ], "produces": [ "application/json" ], "parameters": [ { - "name": "dataflowId", - "description": "The dataflow id", - "in": "path", + "name": "artifacts", + "description": "A composite of artifact ID lists for each type", + "in": "body", "required": true, - "type": "string", - "format": "uuid" + "schema": { + "$ref": "#/definitions/InformationProtectionArtifactsChangeLabel" + } } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Datasources" + "$ref": "#/definitions/InformationProtectionChangeLabelResponse" } } }, "x-ms-examples": { "Example": { "parameters": { - "dataflowId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229" + "artifacts": { + "dashboards": [ + { + "id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542a" + }, + { + "id": "476fcafe-b514-495d-b13f-ca9a4f0b1d8b" + } + ], + "reports": [ + { + "id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542c" + } + ], + "datasets": [ + { + "id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542e" + }, + { + "id": "myDatabaseName" + } + ], + "dataflows": [ + { + "id": "476fcafe-b514-495d-b13f-ca9a4f0b1d8g" + } + ] + } }, "responses": { "200": { "body": { - "value": [ + "dashboards": [ { - "name": "301", - "connectionString": "data source=MyServer.database.windows.net;initial catalog=MyDatabase;persist security info=True;encrypt=True;trustservercertificate=False", - "datasourceType": "Sql", - "datasourceId": "16a54ccd-620d-4af3-9197-0b8c779a9a6d", - "gatewayId": "7f1c4e55-544b-403f-b132-da0d3a024674", - "connectionDetails": { - "server": "MyServer.database.windows.net", - "database": "MyDatabase" - } + "id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542a", + "status": "NotFound" + }, + { + "id": "476fcafe-b514-495d-b13f-ca9a4f0b1d8b", + "status": "Failed" + } + ], + "reports": [ + { + "id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542c", + "status": "Succeeded" + } + ], + "datasets": [ + { + "id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542e", + "status": "InsufficientUsageRights" + }, + { + "id": "myDatabaseName", + "status": "FailedToGetUsageRights" + } + ], + "dataflows": [ + { + "id": "476fcafe-b514-495d-b13f-ca9a4f0b1d8g", + "status": "Succeeded" } ] } @@ -13651,14 +15421,14 @@ "deprecated": false } }, - "/v1.0/myorg/GenerateToken": { + "/v1.0/myorg/admin/informationprotection/setLabels": { "post": { "tags": [ - "EmbedToken" + "Admin" ], - "summary": "Generates an embed token for multiple reports, datasets and target workspaces. Reports and datasets do not have to be related. The binding of a report to a dataset can be done during embedding. Creating a report can only be done in workspaces specified in *targetWrokspaces*.

    This API is relevant only to ['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).", - "description": "
    **Required scope**:
    • Content.Create - required only if a target workspace is specified in [GenerateTokenRequestV2](/rest/api/power-bi/embedtoken/generatetoken#generatetokenrequestv2)
    • Report.ReadWrite.All or Report.Read.All - required only if a report is specified in [GenerateTokenRequestV2](/rest/api/power-bi/embedtoken/generatetoken#generatetokenrequestv2)
    • Report.ReadWrite.All - required if allowEdit flag is specified for at least one report in [GenerateTokenRequestV2](/rest/api/power-bi/embedtoken/generatetoken#generatetokenrequestv2)
    • Dataset.ReadWrite.All or Dataset.Read.All
    To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).
    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.

    Restrictions

    • All the reports and datasets must reside in workspace V2. All the target workpaces must be workspace V2.
    • Maximum number of reports, datasets and target workspaces is 50 each.
    • Generating Embed Token with RLS may not work for AS Azure or AS OnPrem live connection reports for several minutes after a [Rebind](/rest/api/power-bi/reports/RebindReport).
    • Paginated reports are not supported.

    ", - "operationId": "EmbedToken_GenerateToken", + "summary": "Set sensitivity labels on content in Power BI by artifact ID.", + "description": "**Note:** The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.
    To set a sensitivity label using this API, the admin user (or the delegated user, if provided) must have the label included in their [label policy](https://docs.microsoft.com/en-us/microsoft-365/compliance/create-sensitivity-labels?view=o365-worldwide).
    The admin user (and the delegated user, if provided) must have sufficient [usage rights](https://go.microsoft.com/fwlink/?linkid=2157685) to set labels.
    This API allows a maximum of 25 requests per hour. Each request can update up to 2000 artifacts.

    **Required scope**: Tenant.ReadWrite.All

    **Usage sample**: [Set or remove sensitivity labels using Power BI REST admin APIs](https://docs.microsoft.com/power-bi/admin/service-security-sensitivity-label-inheritance-set-remove-api)", + "operationId": "InformationProtection_SetLabelsAsAdmin", "consumes": [ "application/json" ], @@ -13667,12 +15437,12 @@ ], "parameters": [ { - "name": "requestParameters", - "description": "Generate token parameters", + "name": "informationProtectionChangeLabelDetails", + "description": "Set label details.", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/GenerateTokenRequestV2" + "$ref": "#/definitions/InformationProtectionChangeLabelDetails" } } ], @@ -13680,76 +15450,84 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/EmbedToken" + "$ref": "#/definitions/InformationProtectionChangeLabelResponse" } } }, "x-ms-examples": { - "Generate EmbedToken for two datasets with RLS identities and a single report with read-only permissions. This token allows to view the report dynamically bound to two different datasets": { + "Example": { "parameters": { - "requestParameters": { - "datasets": [ - { - "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229" - }, - { - "id": "e75afc47-1150-45e0-aba7-4eb04e4876e5" - } - ], - "reports": [ - { - "id": "b2e49b01-2356-4456-bfb9-3f4c2bc4ddbd" - } - ], - "identities": [ - { - "username": "john@contoso.com", - "roles": [ "sales" ], - "datasets": [ "cfafbeb1-8037-4d0c-896e-a46fb27ff229" ] - }, - { - "username": "iris@contoso.com", - "roles": [ "executive" ], - "datasets": [ "e75afc47-1150-45e0-aba7-4eb04e4876e5" ] - } - ] - } - }, - "responses": { - "200": { - "body": { - "token": "H4sI....AAA=", - "tokenId": "4b76f5ed-5a06-4150-8d1b-60f8e4c186f4", - "expiration": "2028-07-29T17:58:19Z" + "informationProtectionChangeLabelDetails": { + "artifacts": { + "dashboards": [ + { + "id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542a" + }, + { + "id": "476fcafe-b514-495d-b13f-ca9a4f0b1d8b" + } + ], + "reports": [ + { + "id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542c" + } + ], + "datasets": [ + { + "id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542e" + }, + { + "id": "myDatabaseName" + } + ], + "dataflows": [ + { + "id": "476fcafe-b514-495d-b13f-ca9a4f0b1d8g" + } + ] + }, + "labelId": "fe472f5e-636e-4c10-a1c6-7e9edc0b542p", + "assignmentMethod": "Standard", + "delegatedUser": { + "emailAddress": "john@contoso.com" } } - } - }, - "Generate EmbedToken for a dataset and two reports. Editing is allowed for only one of the two reports": { - "parameters": { - "requestParameters": { - "datasets": [ - { - "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229" - } - ], - "reports": [ - { - "allowEdit": true, - "id": "b2e49b01-2356-4456-bfb9-3f4c2bc4ddbd" - }, - { - "id": "759908bb-ead8-4a43-9645-7ffbf921c68d" - } - ] - } }, "responses": { "200": { "body": { - "token": "H4sI....AAA=", - "tokenId": "49ae3742-54c0-4c29-af52-619ff93b5c80", - "expiration": "2018-07-29T17:58:19Z" + "dashboards": [ + { + "id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542a", + "status": "NotFound" + }, + { + "id": "476fcafe-b514-495d-b13f-ca9a4f0b1d8b", + "status": "Failed" + } + ], + "reports": [ + { + "id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542c", + "status": "Succeeded" + } + ], + "datasets": [ + { + "id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542e", + "status": "InsufficientUsageRights" + }, + { + "id": "myDatabaseName", + "status": "FailedToGetUsageRights" + } + ], + "dataflows": [ + { + "id": "476fcafe-b514-495d-b13f-ca9a4f0b1d8g", + "status": "Succeeded" + } + ] } } } @@ -13758,14 +15536,14 @@ "deprecated": false } }, - "/v1.0/myorg/admin/activityevents": { + "/v1.0/myorg/admin/pipelines": { "get": { "tags": [ "Admin" ], - "summary": "Returns a list of audit activity events for a tenant.", - "description": "**Note:** Activity logging isn’t supported for Microsoft Cloud Deutschland. 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.
    This API allows 200 requests per hour at maximum.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All.
    Delegated permissions are supported.
    To call this API, provide either a continuation token or both a start and end date time. StartDateTime and EndDateTime must be in the same UTC day.", - "operationId": "Admin_GetActivityEvents", + "summary": "Returns a list of deployment pipelines for the organization.", + "description": "**Note:** To call this API the user must have administrator rights. Alternatively, authenticate using a service principal.
    This API allows a maximum of 200 requests per hour.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All. ", + "operationId": "Pipelines_GetPipelinesAsAdmin", "consumes": [ ], @@ -13774,231 +15552,161 @@ ], "parameters": [ { - "name": "startDateTime", + "name": "$expand", "in": "query", - "description": "Start date and time of the window for audit event results. Must be in ISO 8601 compliant UTC format.", + "description": "Expands related entities inline, receives a comma-separated list of data types. Supported: users, stages.", "required": false, "type": "string" }, { - "name": "endDateTime", + "name": "$filter", "in": "query", - "description": "End date and time of the window for audit event results. Must be in ISO 8601 compliant UTC format.", + "description": "Filters the results based on a boolean condition.", "required": false, "type": "string" }, { - "name": "continuationToken", + "name": "$top", "in": "query", - "description": "Token required to get the next chunk of the result set", + "description": "Returns only the first n results. This parameter must be in the range of 1-5000.", "required": false, - "type": "string" + "minimum": 1, + "maximum": 5000, + "type": "integer", + "format": "int32" }, { - "name": "$filter", + "name": "$skip", "in": "query", - "description": "Filters the results based on a boolean condition, using 'Activity', 'UserId', or both properties. Supports only 'eq' and 'and' operators.", + "description": "Skips the first n results. Use with top to fetch results beyond the first 5000.", "required": false, - "type": "string" + "type": "integer", + "format": "int32" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ActivityEventResponse" - } - } - }, - "x-ms-examples": { - "Get audit activity events between a time window": { - "parameters": { - "startDateTime": "2019-08-13T07:55:00.000Z", - "endDateTime": "2019-08-13T08:55:00.000Z" - }, - "responses": { - "200": { - "body": { - "activityEventEntities": [ - { - "Id": "41ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e87", - "CreationTime": "2019-08-13T07:55:15", - "Operation": "ViewReport", - "OrganizationId": "e43e3248-3d83-44aa-a94d-c836bd7f9b79", - "UserKey": "779438769", - "Activity": "ViewReport", - "Workload": "PowerBI", - "UserId": "john@contoso.com", - "ClientIP": "127.0.0.1" - }, - { - "Id": "c632aa64-70fc-4e80-88f3-9fc2cdcacce8", - "CreationTime": "2019-08-13T07:55:10", - "Operation": "ViewDashboard", - "OrganizationId": "e43e3248-3d83-44aa-a94d-c836bd7f9b79", - "UserKey": "321HK34324", - "Activity": "ViewDashboard", - "Workload": "PowerBI", - "UserId": "john@contoso.com", - "ClientIP": "131.107.160.240" - } - ], - "continuationUri": "https://api.powerbi.com/v1.0/myorg/admin/activityevents?continuationToken='%2BRID%3A244SAKlHY7YGAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AAQYAAAAAAAAAFwAAAAAAAAA%3D'", - "continuationToken": "%2BRID%3A244SAKlHY7YGAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AAQYAAAAAAAAAFwAAAAAAAAA%3D" - } - } - } - }, - "Get audit activity events between a time window and with a specific activity type": { - "parameters": { - "startDateTime": "2019-08-13T07:55:00.000Z", - "endDateTime": "2019-08-13T08:55:00.000Z", - "$filter": "Activity eq 'ViewReport'" - }, + "$ref": "#/definitions/Pipelines" + } + } + }, + "x-ms-examples": { + "Get deployment pipelines": { + "parameters": {}, "responses": { "200": { - "body": { - "activityEventEntities": [ - { - "Id": "41ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e87", - "CreationTime": "2019-08-13T07:55:15", - "Operation": "ViewReport", - "OrganizationId": "e43e3248-3d83-44aa-a94d-c836bd7f9b79", - "UserKey": "123456", - "Activity": "ViewReport", - "Workload": "PowerBI", - "UserId": "john@contoso.com", - "ClientIP": "127.0.0.1" - }, - { - "Id": "c632aa64-70fc-4e80-88f3-9fc2cdcacce8", - "CreationTime": "2019-08-13T07:55:10", - "Operation": "ViewReport", - "OrganizationId": "e43e3248-3d83-44aa-a94d-c836bd7f9b79", - "UserKey": "42343KJK53K45J", - "Activity": "ViewReport", - "Workload": "PowerBI", - "UserId": "john@contoso.com", - "ClientIP": "131.107.160.240" - } - ], - "continuationUri": "https://api.powerbi.com/v1.0/myorg/admin/activityevents?continuationToken='%2BRID%3A244SAKlHY7YQAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AARAAAAAAAAAAFwAAAAAAAAA%3D'&$filter=Activity eq 'ViewReport'", - "continuationToken": "%2BRID%3A244SAKlHY7YQAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AARAAAAAAAAAAFwAAAAAAAAA%3D" - } + "value": [ + { + "id": "a5ded933-57b7-41f4-b072-ed4c1f9d5824", + "displayName": "Marketing Deployment Pipeline", + "description": "Power BI deployment pipeline to manage marketing reports" + }, + { + "id": "183dcf10-47b8-48c4-84aa-f0bf9d5f8fcf", + "displayName": "Financing Deployment Pipeline", + "description": "Power BI deployment pipeline to manage financing reports" + } + ] } } }, - "Get audit activity events between a time window and with a specific user id": { + "Get deployment pipelines with users expanded": { "parameters": { - "startDateTime": "2019-08-13T07:55:00.000Z", - "endDateTime": "2019-08-13T08:55:00.000Z", - "$filter": "UserId eq 'john@contoso.com'" + "$expand": "users", + "$top": 100 }, "responses": { "200": { "body": { - "activityEventEntities": [ + "value": [ { - "Id": "41ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e87", - "CreationTime": "2019-08-13T07:55:15", - "Operation": "ViewReport", - "OrganizationId": "e43e3248-3d83-44aa-a94d-c836bd7f9b79", - "UserKey": "123456", - "Activity": "ViewReport", - "Workload": "PowerBI", - "UserId": "john@contoso.com", - "ClientIP": "127.0.0.1" + "id": "a5ded933-57b7-41f4-b072-ed4c1f9d5824", + "displayName": "Marketing Deployment Pipeline", + "description": "Power BI deployment pipeline to manage marketing reports", + "users": [ + { + "identifier": "john@contoso.com", + "accessRight": "Admin", + "principalType": "User" + }, + { + "identifier": "154aef10-47b8-48c4-ab97-f0bf9d5f8fcf", + "accessRight": "Admin", + "principalType": "Group" + }, + { + "identifier": "a35d842b-90d5-59a1-c56a-5f8fcff0bf9d", + "accessRight": "Admin", + "principalType": "App" + } + ] }, { - "Id": "c632aa64-70fc-4e80-88f3-9fc2cdcacce8", - "CreationTime": "2019-08-13T07:55:10", - "Operation": "ViewReport", - "OrganizationId": "e43e3248-3d83-44aa-a94d-c836bd7f9b79", - "UserKey": "42343KJK53K45J", - "Activity": "ViewReport", - "Workload": "PowerBI", - "UserId": "john@contoso.com", - "ClientIP": "131.107.160.240" + "id": "183dcf10-47b8-48c4-84aa-f0bf9d5f8fcf", + "displayName": "Financing Deployment Pipeline", + "description": "Power BI deployment pipeline to manage financing reports", + "users": [] } - ], - "continuationUri": "https://api.powerbi.com/v1.0/myorg/admin/activityevents?continuationToken='%2BRID%3A244SAKlHY7YQAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AARAAAAAAAAAAFwAAAAAAAAA%3D'&$filter=Activity eq 'ViewReport'", - "continuationToken": "%2BRID%3A244SAKlHY7YQAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AARAAAAAAAAAAFwAAAAAAAAA%3D" + ] } } } }, - "Get audit activity events between a time window and with a specific activity type and user id": { + "Get orphaned deployment pipelines": { "parameters": { - "startDateTime": "2019-08-13T07:55:00.000Z", - "endDateTime": "2019-08-13T08:55:00.000Z", - "$filter": "Activity eq 'viewreport' and UserId eq 'john@contoso.com'" + "$expand": "users", + "$top": 100, + "$filter": "(not users/any())" }, "responses": { "200": { "body": { - "activityEventEntities": [ - { - "Id": "41ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e87", - "CreationTime": "2019-08-13T07:55:15", - "Operation": "ViewReport", - "OrganizationId": "e43e3248-3d83-44aa-a94d-c836bd7f9b79", - "UserKey": "123456", - "Activity": "ViewReport", - "Workload": "PowerBI", - "UserId": "john@contoso.com", - "ClientIP": "127.0.0.1" - }, + "value": [ { - "Id": "c632aa64-70fc-4e80-88f3-9fc2cdcacce8", - "CreationTime": "2019-08-13T07:55:10", - "Operation": "ViewReport", - "OrganizationId": "e43e3248-3d83-44aa-a94d-c836bd7f9b79", - "UserKey": "42343KJK53K45J", - "Activity": "ViewReport", - "Workload": "PowerBI", - "UserId": "john@contoso.com", - "ClientIP": "131.107.160.240" + "id": "183dcf10-47b8-48c4-84aa-f0bf9d5f8fcf", + "displayName": "Financing Deployment Pipeline", + "description": "Power BI deployment pipeline to manage financing reports", + "users": [] } - ], - "continuationUri": "https://api.powerbi.com/v1.0/myorg/admin/activityevents?continuationToken='%2BRID%3A244SAKlHY7YQAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AARAAAAAAAAAAFwAAAAAAAAA%3D'&$filter=Activity eq 'ViewReport'", - "continuationToken": "%2BRID%3A244SAKlHY7YQAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AARAAAAAAAAAAFwAAAAAAAAA%3D" + ] } } } }, - "Get the next set of audit activity events by sending the continuation token to the API": { + "Get deployment pipelines with stages expanded": { "parameters": { - "continuationToken": "%2BRID%3A244SAKlHY7YQAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AARAAAAAAAAAAFwAAAAAAAAA%3D" + "$expand": "stages", + "$top": 100, + "skip": 0 }, "responses": { "200": { "body": { - "activityEventEntities": [ - { - "Id": "91ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e87", - "CreationTime": "2019-08-13T08:55:15", - "Operation": "ViewReport", - "OrganizationId": "d43e3248-3d83-44aa-a94d-c836bd7f9b79", - "UserKey": "1236", - "Activity": "ViewReport", - "Workload": "PowerBI", - "UserId": "john@contoso.com", - "ClientIP": "127.0.0.1" - }, + "value": [ { - "Id": "g632bb64-70fc-4e80-88f3-9fc2cdcacce8", - "CreationTime": "2019-08-13T09:55:10", - "Operation": "ViewReport", - "OrganizationId": "e43e3248-3d83-44aa-a94d-c836bd7f9b79", - "UserKey": "42343KJK55J", - "Activity": "ViewReport", - "Workload": "PowerBI", - "UserId": "john@contoso.com", - "ClientIP": "131.107.160.240" + "id": "a5ded933-57b7-41f4-b072-ed4c1f9d5824", + "displayName": "Marketing Deployment Pipeline", + "description": "Power BI deployment pipeline to manage marketing reports", + "stages": [ + { + "order": "0", + "workspaceId": "5dba60b0-d9a7-42a3-b12c-6d9d51e7739a", + "workspaceName": "SQlAzure-Refresh" + + }, + { + "order": "1", + "workspaceId": "8ce96c50-85a0-4db3-85c6-7ccc3ed46523", + "workspaceName": "SQlAzure-Refresh[Test]" + }, + { + "order": "2" + } + ] } - ], - "continuationUri": "https://api.powerbi.com/v1.0/myorg/admin/activityevents?continuationToken='%2BRID%$4Z244SAKlHY7YQAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AARAAAAAAAAAAFwAAAAAAAAA%3D'", - "continuationToken": "%2BRID%$4Z244SAKlHY7YQAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AARAAAAAAAAAAFwAAAAAAAAA%3D" + ] } } } @@ -14007,223 +15715,186 @@ "deprecated": false } }, - "/v1.0/myorg/admin/informationprotection/removeLabels": { - "post": { + "/v1.0/myorg/admin/pipelines/{pipelineId}/users": { + "get": { "tags": [ "Admin" ], - "summary": "Remove sensitivity labels from artifacts by artifact ID.", - "description": "**Note:** The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.
    The admin user must have sufficient [usage rights](https://go.microsoft.com/fwlink/?linkid=2157685) to delete labels.
    This API allows a maximum of 25 requests per hour. Each request can update up to 2000 artifacts.

    **Required scope**: Tenant.ReadWrite.All", - "operationId": "InformationProtection_RemoveLabelsAsAdmin", + "summary": "Returns a list of users that have access to a specified deployment pipeline.", + "description": "**Note:** To call this API the user must have administrator rights. Alternatively, authenticate using a service principal.
    This API allows a maximum of 200 requests per hour.

    **Required scope**: Tenant.Read.All or Tenant.ReadWrite.All. ", + "operationId": "Pipelines_GetPipelineUsersAsAdmin", "consumes": [ - "application/json" + ], "produces": [ "application/json" ], "parameters": [ { - "name": "artifacts", - "description": "Composite of artifact Id lists per Type.", - "in": "body", + "name": "pipelineId", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/InformationProtectionArtifactsChangeLabel" - } + "description": "The deployment pipeline ID", + "type": "string", + "format": "uuid" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/InformationProtectionChangeLabelResponse" + "$ref": "#/definitions/PipelineUsers" } } }, "x-ms-examples": { - "Example": { + "Get users of a deployment pipeline": { "parameters": { - "artifacts": { - "dashboards": [ + "pipelineId": "8ce96c50-85a0-4db3-85c6-7ccc3ed46523" + }, + "responses": { + "200": { + "value": [ { - "id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542a" + "identifier": "john@contoso.com", + "accessRight": "Admin", + "principalType": "User" }, { - "id": "476fcafe-b514-495d-b13f-ca9a4f0b1d8b" - } - ], - "reports": [ - { - "id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542c" - } - ], - "datasets": [ - { - "id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542e" + "identifier": "154aef10-47b8-48c4-ab97-f0bf9d5f8fcf", + "accessRight": "Admin", + "principalType": "Group" }, { - "id": "myDatabaseName" - } - ], - "dataflows": [ - { - "id": "476fcafe-b514-495d-b13f-ca9a4f0b1d8g" + "identifier": "a35d842b-90d5-59a1-c56a-5f8fcff0bf9d", + "accessRight": "Admin", + "principalType": "App" } ] } - }, - "responses": { - "200": { - "body": { - "dashboards": [ - { - "id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542a", - "status": "NotFound" - }, - { - "id": "476fcafe-b514-495d-b13f-ca9a4f0b1d8b", - "status": "Failed" - } - ], - "reports": [ - { - "id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542c", - "status": "Succeeded" - } - ], - "datasets": [ - { - "id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542e", - "status": "InsufficientUsageRights" - }, - { - "id": "myDatabaseName", - "status": "FailedToGetUsageRights" - } - ], - "dataflows": [ - { - "id": "476fcafe-b514-495d-b13f-ca9a4f0b1d8g", - "status": "Succeeded" - } - ] - } + } + } + }, + "deprecated": false + }, + "post": { + "tags": [ + "Admin" + ], + "summary": "Grants user permissions to a specified deployment pipeline.", + "description": "**Note:** To call this API the user must have administrator rights.
    This API allows a maximum of 200 requests per hour.

    **Required scope**: Tenant.ReadWrite.All.

    **Limitations:** This API doesn't support service principals. You cannot update service principal's permissions.", + "operationId": "Pipelines_UpdateUserAsAdmin", + "consumes": [ + "application/json" + ], + "produces": [ + ], + "parameters": [ + { + "name": "pipelineId", + "in": "path", + "required": true, + "description": "The deployment pipeline ID", + "type": "string", + "format": "uuid" + }, + { + "name": "userDetails", + "in": "body", + "description": "Details of user access right", + "required": true, + "schema": { + "$ref": "#/definitions/PipelineUser" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-ms-examples": { + "Add user to a deployment pipeline": { + "parameters": { + "pipelineId": "8ce96c50-85a0-4db3-85c6-7ccc3ed46523", + "userDetails": { + "identifier": "john@contoso.com", + "accessRight": "Admin", + "principalType": "User" + } + }, + "responses": { + "200": {} + } + }, + "Add group to a deployment pipeline": { + "parameters": { + "pipelineId": "8ce96c50-85a0-4db3-85c6-7ccc3ed46523", + "userDetails": { + "identifier": "154aef10-47b8-48c4-ab97-f0bf9d5f8fcf", + "accessRight": "Admin", + "principalType": "Group" } + }, + "responses": { + "200": {} } } }, "deprecated": false } }, - "/v1.0/myorg/admin/informationprotection/setLabels": { - "post": { + "/v1.0/myorg/admin/pipelines/{pipelineId}/users/{identifier}": { + "delete": { "tags": [ "Admin" ], - "summary": "Set sensitivity labels on content in Power BI by artifact ID.", - "description": "**Note:** The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.
    To set a sensitivity label using this API, the admin user (or the delegated user, if provided) must have the label included in their [label policy](https://docs.microsoft.com/en-us/microsoft-365/compliance/create-sensitivity-labels?view=o365-worldwide).
    The admin user (and the delegated user, if provided) must have sufficient [usage rights](https://go.microsoft.com/fwlink/?linkid=2157685) to set labels.
    This API allows a maximum of 25 requests per hour. Each request can update up to 2000 artifacts.

    **Required scope**: Tenant.ReadWrite.All", - "operationId": "InformationProtection_SetLabelsAsAdmin", + "summary": "Remove user permissions from a specified deployment pipeline.", + "description": "**Note:** To call this API the user must have administrator rights.
    This API allows a maximum of 200 requests per hour.

    **Required scope**: Tenant.ReadWrite.All.

    **Limitations:** This API doesn't support service principals. You cannot delete service principal's permissions.", + "operationId": "Pipelines_DeleteUserAsAdmin", "consumes": [ - "application/json" ], "produces": [ - "application/json" ], "parameters": [ { - "name": "informationProtectionChangeLabelDetails", - "description": "Set label details.", - "in": "body", + "name": "pipelineId", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/InformationProtectionChangeLabelDetails" - } + "description": "The deployment pipeline ID", + "type": "string", + "format": "uuid" + }, + { + "name": "identifier", + "in": "path", + "required": true, + "description": "For Principal type 'User' provide UPN , otherwise provide [Object ID](/power-bi/developer/embedded/embedded-troubleshoot#what-is-the-difference-between-application-object-id-and-principal-object-id) of the principal", + "type": "string" } ], "responses": { "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/InformationProtectionChangeLabelResponse" - } + "description": "OK" } }, "x-ms-examples": { - "Example": { + "Delete user access from a deployment pipeline": { "parameters": { - "informationProtectionChangeLabelDetails": { - "artifacts": { - "dashboards": [ - { - "id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542a" - }, - { - "id": "476fcafe-b514-495d-b13f-ca9a4f0b1d8b" - } - ], - "reports": [ - { - "id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542c" - } - ], - "datasets": [ - { - "id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542e" - }, - { - "id": "myDatabaseName" - } - ], - "dataflows": [ - { - "id": "476fcafe-b514-495d-b13f-ca9a4f0b1d8g" - } - ] - }, - "labelId" : "fe472f5e-636e-4c10-a1c6-7e9edc0b542p", - "assignmentMethod" : "Standard", - "delegatedUser": { - "emailAddress" : "john@contoso.com" - } - } + "pipelineId": "8ce96c50-85a0-4db3-85c6-7ccc3ed46523", + "identifier": "john@contoso.com" }, "responses": { - "200": { - "body": { - "dashboards": [ - { - "id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542a", - "status": "NotFound" - }, - { - "id": "476fcafe-b514-495d-b13f-ca9a4f0b1d8b", - "status": "Failed" - } - ], - "reports": [ - { - "id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542c", - "status": "Succeeded" - } - ], - "datasets": [ - { - "id": "fe472f5e-636e-4c10-a1c6-7e9edc0b542e", - "status": "InsufficientUsageRights" - }, - { - "id": "myDatabaseName", - "status": "FailedToGetUsageRights" - } - ], - "dataflows": [ - { - "id": "476fcafe-b514-495d-b13f-ca9a4f0b1d8g", - "status": "Succeeded" - } - ] - } - } + "200": {} + } + }, + "Delete group access from a deployment pipeline": { + "parameters": { + "pipelineId": "8ce96c50-85a0-4db3-85c6-7ccc3ed46523", + "identifier": "5dba60b0-d9a7-42a3-b12c-6d9d51e7739a" + }, + "responses": { + "200": {} } } }, @@ -14333,14 +16004,14 @@ "name": "groupId", "in": "path", "required": true, - "description": "The workspace id", + "description": "The workspace ID", "type": "string", "format": "uuid" }, { "name": "reportId", "in": "path", - "description": "The report id", + "description": "The report ID", "required": true, "type": "string", "format": "uuid" @@ -14573,6 +16244,13 @@ "items": { "$ref": "#/definitions/Dataflow" } + }, + "users": { + "type": "array", + "description": "Users have access to the workspace, only apply when user information is requested explicitly. The list is retrieved for V2 workspaces but not for classic workspaces. To retirve the users for classic workspace, call AAD Graph APIs.", + "items": { + "$ref": "#/definitions/GroupUser" + } } } }, @@ -14585,7 +16263,7 @@ "id": { "type": "string", "format": "uuid", - "description": "The import id" + "description": "The import ID" }, "name": { "type": "string", @@ -14593,7 +16271,12 @@ }, "importState": { "type": "string", - "description": "The import upload state" + "description": "The import upload state", + "enum": [ + "Publishing", + "Succeeded", + "Failed" + ] }, "reports": { "type": "array", @@ -14675,7 +16358,7 @@ "properties": { "id": { "type": "string", - "description": "The dataset id" + "description": "The dataset ID" }, "name": { "type": "string", @@ -14752,9 +16435,31 @@ "$ref": "#/definitions/DependentDataflow" } }, + "tables": { + "type": "array", + "description": "The dataset tables", + "items": { + "$ref": "#/definitions/Table" + } + }, "sensitivityLabel": { "$ref": "#/definitions/SensitivityLabel", "description": "The dataset sensitivity label" + }, + "users": { + "type": "array", + "description": "The Dataset User Access Details. This value will be empty. It will be removed from the payload response in an upcoming release. To retrieve user information on an artifact, please consider using the Get Dataset User as Admin APIs, or the PostWorkspaceInfo API with the getArtifactUser parameter.", + "items": { + "$ref": "#/definitions/DatasetUser" + } + }, + "schemaRetrievalError": { + "type": "string", + "description": "The dataset schema retrieval error" + }, + "schemaMayNotBeUpToDate": { + "type": "boolean", + "description": "Whether dataset schema may not be up to date" } } }, @@ -14898,6 +16603,33 @@ "items": { "$ref": "#/definitions/Measure" } + }, + "isHidden": { + "type": "boolean", + "description": "(Optional) Whether dataset table is hidden" + }, + "description": { + "type": "string", + "description": "The table description" + }, + "source": { + "type": "array", + "description": "The table source", + "items": { + "$ref": "#/definitions/ASMashupExpression" + } + } + } + }, + "ASMashupExpression": { + "description": "A dataset table source", + "required": [ + "expression" + ], + "properties": { + "expression": { + "type": "string", + "description": "The source expression" } } }, @@ -15030,12 +16762,12 @@ "gatewayId": { "type": "string", "format": "uuid", - "description": "The bound gateway id. Empty when not bound to a gateway." + "description": "The bound gateway ID. Empty when not bound to a gateway. When using a gateway cluster, the gateway ID refers to the primary (first) gateway in the cluster. In such cases, gateway ID is similar to gateway cluster ID." }, "datasourceId": { "type": "string", "format": "uuid", - "description": "The bound datasource id. Empty when not bound to a gateway." + "description": "The bound datasource ID, which is empty when not bound to a gateway" } } }, @@ -15064,7 +16796,7 @@ "properties": { "updateDetails": { "type": "array", - "description": "The connection server", + "description": "An array of datasource connection update requests", "items": { "$ref": "#/definitions/UpdateDatasourceConnectionRequest" } @@ -15079,11 +16811,11 @@ "properties": { "connectionDetails": { "$ref": "#/definitions/DatasourceConnectionDetails", - "description": "" + "description": "The target connection details of the updated datasource." }, "datasourceSelector": { "$ref": "#/definitions/Datasource", - "description": "" + "description": "The connection details of the datasource that need to be updated. This is mandataory when the dataset has more than one datasource." } } }, @@ -15130,7 +16862,7 @@ "properties": { "id": { "type": "string", - "description": "The unique row id" + "description": "The unique row ID" } } }, @@ -15207,12 +16939,12 @@ "id": { "type": "string", "format": "uuid", - "description": "The unique id for this datasource" + "description": "The unique ID for this datasource" }, "gatewayId": { "type": "string", "format": "uuid", - "description": "The associated gateway id" + "description": "The associated gateway ID. When using a gateway cluster, the gateway ID refers to the primary (first) gateway in the cluster. In such cases, gateway ID is similar to gateway cluster ID." }, "datasourceName": { "type": "string", @@ -15220,7 +16952,7 @@ }, "datasourceType": { "type": "string", - "description": "The type of the datasource" + "description": "The type of the datasource:
    • Sql
    • AnalysisServices
    • SAPHana
    • File
    • Folder
    • Oracle
    • Teradata
    • SharePointList
    • Web
    • OData
    • DB2
    • MySql
    • PostgreSql
    • Sybase
    • Extension
    • SAPBW
    • AzureTables
    • AzureBlobs
    • Informix
    • ODBC
    • Excel
    • SharePoint
    • PubNub
    • MQ
    • BizTalk
    • GoogleAnalytics
    • CustomHttpApi
    • Exchange
    • Facebook
    • HDInsight
    • AzureMarketplace
    • ActiveDirectory
    • Hdfs
    • SharePointDocLib
    • PowerQueryMashup
    • OleDb
    • AdoDotNet
    • Salesforce
    • CustomConnector
    • SAPBWMessageServer
    • AdobeAnalytics
    • Essbase
    • AzureDataLakeStorage
    • SapErp
    • UIFlow
    • CDPA
    • EventHub
    " }, "connectionDetails": { "type": "string", @@ -15240,6 +16972,10 @@ "name": "credentialType", "modelAsExtensible": true } + }, + "credentialDetails": { + "$ref": "#/definitions/GatewayDatasourceCredentialDetails", + "description": "The connection details of the datasource that need to be updated. This is mandataory when the dataset has more than one datasource." } } }, @@ -15248,11 +16984,11 @@ "properties": { "targetDataflowId": { "type": "string", - "description": "The target dataflow id" + "description": "The target dataflow ID" }, "groupId": { "type": "string", - "description": "The target group id" + "description": "The target group ID" } } }, @@ -15261,15 +16997,15 @@ "properties": { "datasetObjectId": { "type": "string", - "description": "The dataset object id" + "description": "The dataset object ID" }, "dataflowObjectId": { "type": "string", - "description": "The dataflow object id" + "description": "The dataflow object ID" }, "workspaceObjectId": { "type": "string", - "description": "The workspace object id" + "description": "The workspace object ID" } } }, @@ -15461,6 +17197,119 @@ } } }, + "AppUsers": { + "description": "Odata response wrapper for a Power BI user access right for app List", + "properties": { + "odata.context": { + "type": "string" + }, + "value": { + "type": "array", + "description": "The user access right for app List", + "items": { + "$ref": "#/definitions/AppUser" + } + } + } + }, + "CapacityUsers": { + "description": "Odata response wrapper for a Power BI user access right for capacity List", + "properties": { + "odata.context": { + "type": "string" + }, + "value": { + "type": "array", + "description": "The user access right for capacity List", + "items": { + "$ref": "#/definitions/CapacityUser" + } + } + } + }, + "ReportUsers": { + "description": "Odata response wrapper for a Power BI user access right for report List", + "properties": { + "odata.context": { + "type": "string" + }, + "value": { + "type": "array", + "description": "The user access right for report List", + "items": { + "$ref": "#/definitions/ReportUser" + } + } + } + }, + "DashboardUsers": { + "description": "Odata response wrapper for a Power BI user access right for dashboard List", + "properties": { + "odata.context": { + "type": "string" + }, + "value": { + "type": "array", + "description": "The user access right for dashboard List", + "items": { + "$ref": "#/definitions/DashboardUser" + } + } + } + }, + "DatasetUsers": { + "description": "Odata response wrapper for a Power BI user access right for dataset List", + "properties": { + "odata.context": { + "type": "string" + }, + "value": { + "type": "array", + "description": "The user access right for dataset List", + "items": { + "$ref": "#/definitions/DatasetUser" + } + } + } + }, + "DataflowUsers": { + "description": "Odata response wrapper for a Power BI user access right for dataflow List", + "properties": { + "odata.context": { + "type": "string" + }, + "value": { + "type": "array", + "description": "The user access right for dataflow List", + "items": { + "$ref": "#/definitions/DataflowUser" + } + } + } + }, + "ArtifactAccessResponse": { + "description": "Odata response wrapper for a Power BI artifact access list for user", + "properties": { + "odata.context": { + "type": "string" + }, + "value": { + "type": "array", + "description": "The artifact access list for user", + "items": { + "$ref": "#/definitions/ArtifactAccessEntry" + } + }, + "continuationUri": { + "type": "string", + "description": "The URI for the next chunk in the result set" + }, + "continuationToken": { + "type": "string", + "description": "Token to get the next chunk of the result set" + } + } + }, "Report": { "required": [ "id" @@ -15470,7 +17319,7 @@ "id": { "type": "string", "format": "uuid", - "description": "The report id" + "description": "The report ID" }, "name": { "type": "string", @@ -15486,7 +17335,7 @@ }, "datasetId": { "type": "string", - "description": "The dataset id" + "description": "The dataset ID" }, "description": { "type": "string", @@ -15494,7 +17343,7 @@ }, "createdBy": { "type": "string", - "description": "The report owner" + "description": "The report owner. Available only for reports created after June 2019." }, "modifiedBy": { "type": "string", @@ -15525,6 +17374,13 @@ "enum": [ "PaginatedReport" ] + }, + "users": { + "type": "array", + "description": "The Report User Access Details. This value will be empty. It will be removed from the payload response in an upcoming release. To retrieve user information on an artifact, please consider using the Get Report User as Admin APIs, or the PostWorkspaceInfo API with the getArtifactUser parameter.", + "items": { + "$ref": "#/definitions/ReportUser" + } } } }, @@ -15555,7 +17411,7 @@ "id": { "type": "string", "format": "uuid", - "description": "The dashboard id" + "description": "The dashboard ID" }, "displayName": { "type": "string", @@ -15583,6 +17439,13 @@ "sensitivityLabel": { "$ref": "#/definitions/SensitivityLabel", "description": "The dashboard sensitivity label" + }, + "users": { + "type": "array", + "description": "The Dashboard User Access Details. This value will be empty. It will be removed from the payload response in an upcoming release. To retrieve user information on an artifact, please consider using the Get Dashboard User as Admin APIs, or the PostWorkspaceInfo API with the getArtifactUser parameter.", + "items": { + "$ref": "#/definitions/DashboardUser" + } } } }, @@ -15595,7 +17458,7 @@ "id": { "type": "string", "format": "uuid", - "description": "The tile id" + "description": "The tile ID" }, "title": { "type": "string", @@ -15620,11 +17483,11 @@ "reportId": { "type": "string", "format": "uuid", - "description": "The report id. Available only for tiles created from a report." + "description": "The report ID, which is available only for tiles created from a report" }, "datasetId": { "type": "string", - "description": "The dataset id. Available only for tiles created from a report or using a dataset; for example, Q&A tiles." + "description": "The dataset ID, which is available only for tiles created from a report or using a dataset, such as Q&A tiles" } } }, @@ -15637,7 +17500,7 @@ "id": { "type": "string", "format": "uuid", - "description": "The workspace id" + "description": "The workspace ID" }, "name": { "type": "string", @@ -15654,7 +17517,7 @@ "capacityId": { "type": "string", "format": "uuid", - "description": "The capacity id" + "description": "The capacity ID" }, "description": { "type": "string", @@ -15670,7 +17533,7 @@ }, "users": { "type": "array", - "description": "The users that belong to the group, and their access rights. Available only for admin API calls.", + "description": "The users that belong to the group, and their access rights. This value will be empty. It will be removed from the payload response in an upcoming release. To retrieve user information on an artifact, please consider using the Get Group User APIs, or the PostWorkspaceInfo API with the getArtifactUser parameter.", "items": { "$ref": "#/definitions/GroupUser" } @@ -15706,7 +17569,7 @@ "dataflowStorageId": { "type": "string", "format": "uuid", - "description": "The Power BI dataflow storage account id" + "description": "The Power BI dataflow storage account ID" }, "workbooks": { "type": "array", @@ -15714,6 +17577,11 @@ "items": { "$ref": "#/definitions/Workbook" } + }, + "pipelineId": { + "type": "string", + "format": "uuid", + "description": "The deployment pipeline ID that the workspace is assigned to. Available only for workspaces in the new workspace experience and only for admin API calls." } } }, @@ -15726,7 +17594,7 @@ "id": { "type": "string", "format": "uuid", - "description": "The app id" + "description": "The app ID" }, "name": { "type": "string", @@ -15770,7 +17638,7 @@ "id": { "type": "string", "format": "uuid", - "description": "The gateway id" + "description": "The gateway ID. When using a gateway cluster, the gateway ID refers to the primary (first) gateway in the cluster. In such cases, gateway ID is similar to gateway cluster ID." }, "name": { "type": "string", @@ -15897,6 +17765,15 @@ } } }, + "GatewayDatasourceCredentialDetails": { + "description": "The datasource credential details", + "properties": { + "useEndUserOAuth2Credentials": { + "type": "boolean", + "description": "Indicates if the end-user OAuth2 credentials are used for connecting to the datasource in DirectQuery mode." + } + } + }, "UpdateDatasourceRequest": { "required": [ "credentialDetails" @@ -15917,7 +17794,7 @@ "gatewayObjectId": { "type": "string", "format": "uuid", - "description": "The gateway id" + "description": "The gateway ID. When using a gateway cluster, the gateway ID refers to the primary (first) gateway in the cluster. In such cases, gateway ID is similar to gateway cluster ID." }, "datasourceObjectIds": { "type": "array", @@ -15925,7 +17802,7 @@ "items": { "type": "string", "format": "uuid", - "description": "The datasource id" + "description": "The datasource ID" } } } @@ -16081,7 +17958,7 @@ }, "localTimeZoneId": { "type": "string", - "description": "The Id of the Time zone to use. See [Time Zone Info](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id)." + "description": "The ID of the time zone to use. See [Time Zone Info](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id)" }, "NotifyOption": { "type": "string", @@ -16147,128 +18024,416 @@ } } }, - "times": { - "type": "array", - "description": "Times to execute the refresh within each day", - "items": { - "type": "string", - "description": "Time slot, in the format of hh:mm where hh is the hour (from 00 to 23) and mm is the minutes (can only be 00 or 30). " - } + "times": { + "type": "array", + "description": "Times to execute the refresh within each day", + "items": { + "type": "string", + "description": "Time slot, in the format of hh:mm where hh is the hour (from 00 to 23) and mm is the minutes (can only be 00 or 30). " + } + }, + "localTimeZoneId": { + "type": "string", + "description": "The ID of the time zone to use. See [Time Zone Info](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id)" + } + } + }, + "MashupParameter": { + "description": "Power BI dataset parameter", + "properties": { + "name": { + "type": "string", + "description": "The parameter name" + }, + "type": { + "type": "string", + "description": "The parameter type" + }, + "currentValue": { + "type": "string", + "description": "The parameter current value" + }, + "isRequired": { + "type": "boolean", + "description": "Is dataset parameter required" + }, + "suggestedValues": { + "type": "array", + "description": "List of the parameter suggested values", + "items": { + "type": "string" + } + } + }, + "required": [ + "name", + "type", + "isRequired" + ] + }, + "UpdateMashupParameterDetails": { + "description": "Power BI dataset parameter update details", + "properties": { + "name": { + "type": "string", + "description": "The parameter name" + }, + "newValue": { + "type": "string", + "description": "The parameter new value" + } + }, + "required": [ + "name" + ] + }, + "UpdateMashupParametersRequest": { + "description": "Power BI dataset parameter update request", + "properties": { + "updateDetails": { + "type": "array", + "description": "The dataset parameter list to update", + "items": { + "$ref": "#/definitions/UpdateMashupParameterDetails" + } + } + }, + "required": [ + "updateDetails" + ] + }, + "MashupParameters": { + "description": "Odata response wrapper for a Power BI dataset parameter list", + "properties": { + "odata.context": { + "type": "string" + }, + "value": { + "type": "array", + "description": "The dataset parameter List", + "items": { + "$ref": "#/definitions/MashupParameter" + } + } + } + }, + "DatasourceUser": { + "required": [ + "datasourceAccessRight" + ], + "description": "A Power BI user access right entry for datasource", + "properties": { + "datasourceAccessRight": { + "type": "string", + "description": "The user access rights for the datasource.", + "enum": [ + "None", + "Read", + "ReadOverrideEffectiveIdentity" + ], + "x-ms-enum": { + "name": "DatasourceUserAccessRight", + "modelAsExtensible": true, + "values": [ + { + "value": "None", + "description": "Removes permission to access the datasource. Only applies when updating user permissions." + }, + { + "value": "Read", + "description": "Indicates that datasets owned by the user has read access to this datasource." + }, + { + "value": "ReadOverrideEffectiveIdentity", + "description": "Indicates that user can override effective identity for Power BI Embedded." + } + ] + } + }, + "emailAddress": { + "type": "string", + "description": "Email address of the user" + }, + "displayName": { + "type": "string", + "description": "Display name of the principal" + }, + "identifier": { + "type": "string", + "description": "[Object ID](/power-bi/developer/embedded/embedded-troubleshoot#what-is-the-difference-between-application-object-id-and-principal-object-id) of the principal" + }, + "principalType": { + "$ref": "#/definitions/PrincipalType" + } + } + }, + "GroupUser": { + "required": [ + "groupUserAccessRight" + ], + "description": "A Power BI user access right entry for workspace", + "properties": { + "groupUserAccessRight": { + "type": "string", + "description": "Access rights user has for the workspace (Permission level)", + "enum": [ + "None", + "Member", + "Admin", + "Contributor", + "Viewer" + ], + "x-ms-enum": { + "name": "GroupUserAccessRight", + "modelAsExtensible": true, + "values": [ + { + "value": "None", + "description": "Removes permission to content in workspace" + }, + { + "value": "Member", + "description": "Grants Read, Reshare and Explore access to content in workspace" + }, + { + "value": "Admin", + "description": "Grants administrator rights to workspace" + }, + { + "value": "Contributor", + "description": "Grants Read and Explore access to content in group" + }, + { + "value": "Viewer", + "description": "Grants Read only access to content in group" + } + ] + } + }, + "emailAddress": { + "type": "string", + "description": "Email address of the user" + }, + "displayName": { + "type": "string", + "description": "Display name of the principal" + }, + "identifier": { + "type": "string", + "description": "[Object ID](/power-bi/developer/embedded/embedded-troubleshoot#what-is-the-difference-between-application-object-id-and-principal-object-id) of the principal" + }, + "graphId": { + "type": "string", + "description": "Identifier of the principal in Microsoft Graph. Only available for admin APIs." + }, + "principalType": { + "$ref": "#/definitions/PrincipalType" + } + } + }, + "AppUser": { + "required": [ + "appUserAccessRight" + ], + "description": "A Power BI user access right entry for app", + "properties": { + "appUserAccessRight": { + "type": "string", + "description": "Access rights user has for the app", + "enum": [ + "None", + "Read", + "ReadWrite", + "ReadReshare", + "ReadWriteReshare", + "ReadExplore", + "ReadCopy", + "ReadExploreCopy", + "ReadReshareExplore", + "ReadReshareExploreCopy", + "ReadWriteExplore", + "ReadWriteReshareExplore", + "ReadWriteExploreCopy", + "All" + + ], + "x-ms-enum": { + "name": "AppUserAccessRight", + "modelAsExtensible": true, + "values": [ + { + "value": "None", + "description": "No permission to content in app" + }, + { + "value": "Read", + "description": "Grants Read access to content in app" + }, + { + "value": "ReadWrite", + "description": "Grants Read and Write access to content in app" + }, + { + "value": "ReadReshare", + "description": "Grants Read and Reshare access to content in app" + }, + { + "value": "ReadWriteReshare", + "description": "Grants Read, Write and Reshare access to content in app" + }, + { + "value": "ReadExplore", + "description": "Grants Read and Explore access to content in app" + }, + { + "value": "ReadCopy", + "description": "Grants Read and Copy access to content in app" + }, + { + "value": "ReadExploreCopy", + "description": "Grants Read, Explore and Copy access to content in app" + }, + { + "value": "ReadReshareExploreCopy", + "description": "Grants Read, Reshare, Explore and Copy access to content in app" + }, + { + "value": "ReadReshareExplore", + "description": "Grants Read, Reshare and Explore access to content in app" + }, + { + "value": "ReadWriteExplore", + "description": "Grants Read, Write and Explore access to content in app" + }, + { + "value": "ReadWriteReshareExplore", + "description": "Grants Read, Write, Reshare and Explore access to content in app" + }, + { + "value": "ReadWriteExploreCopy", + "description": "Grants Read, Write, Explore and Copy access to content in app" + }, + { + "value": "All", + "description": "Grants Read, Write, Explore, Reshare and Copy access to content in app" + } + ] + } + }, + "emailAddress": { + "type": "string", + "description": "Email address of the user" }, - "localTimeZoneId": { + "displayName": { + "type": "string", + "description": "Display name of the principal" + }, + "identifier": { + "type": "string", + "description": "Identifier of the principal" + }, + "graphId": { "type": "string", - "description": "The Id of the Time zone to use. See [Time Zone Info](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id)." + "description": "Identifier of the principal in Microsoft Graph. Only available for admin APIs." + }, + "principalType": { + "$ref": "#/definitions/PrincipalType" } } }, - "MashupParameter": { - "description": "Power BI dataset parameter", + "CapacityUser": { + "required": [ + "capacityUserAccessRight" + ], + "description": "A Power BI user access right entry for capacity", "properties": { - "name": { + "capacityUserAccessRight": { "type": "string", - "description": "The parameter name" + "description": "Access right user has on the capacity", + "enum": [ + "None", + "Assign", + "Admin" + ], + "x-ms-enum": { + "name": "capacityUserAccessRight", + "modelAsExtensible": true, + "values": [ + { + "value": "None", + "description": "User doesn't have access to the capacity" + }, + { + "value": "Assign", + "description": "User has contributor rights and can assign workspaces to the capacity" + }, + { + "value": "Admin", + "description": "User has administrator rights on the capacity" + } + ] + } }, - "type": { + "emailAddress": { "type": "string", - "description": "The parameter type" + "description": "Email address of the user" }, - "currentValue": { + "displayName": { "type": "string", - "description": "The parameter current value" - }, - "isRequired": { - "type": "boolean", - "description": "Is dataset parameter required" + "description": "Display name of the principal" }, - "suggestedValues": { - "type": "array", - "description": "List of the parameter suggested values", - "items": { - "type": "string" - } - } - }, - "required": [ - "name", - "type", - "isRequired" - ] - }, - "UpdateMashupParameterDetails": { - "description": "Power BI dataset parameter update details", - "properties": { - "name": { + "identifier": { "type": "string", - "description": "The parameter name" + "description": "Identifier of the principal" }, - "newValue": { + "graphId": { "type": "string", - "description": "The parameter new value" - } - }, - "required": [ - "name" - ] - }, - "UpdateMashupParametersRequest": { - "description": "Power BI dataset parameter update request", - "properties": { - "updateDetails": { - "type": "array", - "description": "The dataset parameter list to update", - "items": { - "$ref": "#/definitions/UpdateMashupParameterDetails" - } - } - }, - "required": [ - "updateDetails" - ] - }, - "MashupParameters": { - "description": "Odata response wrapper for a Power BI dataset parameter list", - "properties": { - "odata.context": { - "type": "string" + "description": "Identifier of the principal in Microsoft Graph. Only available for admin APIs." }, - "value": { - "type": "array", - "description": "The dataset parameter List", - "items": { - "$ref": "#/definitions/MashupParameter" - } + "principalType": { + "$ref": "#/definitions/PrincipalType" } } }, - "DatasourceUser": { + "ReportUser": { "required": [ - "datasourceAccessRight" + "reportUserAccessRight" ], - "description": "A Power BI user access right entry for datasource", + "description": "A Power BI user access right entry for report", "properties": { - "datasourceAccessRight": { + "reportUserAccessRight": { "type": "string", - "description": "The user access rights for the datasource.", + "description": "Access rights user has for the report (Permission level)", "enum": [ "None", "Read", - "ReadOverrideEffectiveIdentity" + "ReadWrite", + "ReadReshare", + "Owner" ], "x-ms-enum": { - "name": "DatasourceUserAccessRight", + "name": "ReportUserAccessRight", "modelAsExtensible": true, "values": [ { "value": "None", - "description": "Removes permission to access the datasource. Only applies when updating user permissions." + "description": "No permission to content in report" }, { "value": "Read", - "description": "Indicates that datasets owned by the user has read access to this datasource." + "description": "Grants Read access to content in report" }, { - "value": "ReadOverrideEffectiveIdentity", - "description": "Indicates that user can override effective identity for Power BI Embedded." + "value": "ReadWrite", + "description": "Grants Read and Write access to content in report" + }, + { + "value": "ReadReshare", + "description": "Grants Read and Reshare access to content in report" + }, + { + "value": "Owner", + "description": "Grants Read, Write and Reshare access to content in report" } ] } @@ -16283,76 +18448,140 @@ }, "identifier": { "type": "string", - "description": "[Object ID](/power-bi/developer/embedded/embedded-troubleshoot#what-is-the-difference-between-application-object-id-and-principal-object-id) of the principal" + "description": "Identifier of the principal" + }, + "graphId": { + "type": "string", + "description": "Identifier of the principal in Microsoft Graph. Only available for admin APIs." }, "principalType": { + "$ref": "#/definitions/PrincipalType" + } + } + }, + "DashboardUser": { + "required": [ + "dashboardUserAccessRight" + ], + "description": "A Power BI user access right entry for dashboard", + "properties": { + "dashboardUserAccessRight": { "type": "string", - "description": "The principal type", + "description": "Access rights user has for the dashboard (Permission level)", "enum": [ - "User", - "Group", - "App" + "None", + "Read", + "ReadWrite", + "ReadReshare", + "Owner" ], "x-ms-enum": { - "name": "PrincipalType", + "name": "DashboardUserAccessRight", "modelAsExtensible": true, "values": [ { - "value": "User", - "description": "User principal type" + "value": "None", + "description": "No permission to content in dashboard" + }, + { + "value": "Read", + "description": "Grants Read access to content in dashboard" + }, + { + "value": "ReadWrite", + "description": "Grants Read and Write access to content in dashboard" }, { - "value": "Group", - "description": "Group principal type" + "value": "ReadReshare", + "description": "Grants Read and Reshare access to content in dashboard" }, { - "value": "App", - "description": "App principal type" + "value": "Owner", + "description": "Grants Read, Write and Reshare access to content in report" } ] } + }, + "emailAddress": { + "type": "string", + "description": "Email address of the user" + }, + "displayName": { + "type": "string", + "description": "Display name of the principal" + }, + "identifier": { + "type": "string", + "description": "Identifier of the principal" + }, + "graphId": { + "type": "string", + "description": "Identifier of the principal in Microsoft Graph. Only available for admin APIs." + }, + "principalType": { + "$ref": "#/definitions/PrincipalType" } } }, - "GroupUser": { + "DatasetUser": { "required": [ - "groupUserAccessRight" + "datasetUserAccessRight" ], - "description": "A Power BI user access right entry for workspace", + "description": "A Power BI user access right entry for dataset", "properties": { - "groupUserAccessRight": { + "datasetUserAccessRight": { "type": "string", - "description": "Access rights user has for the workspace", + "description": "Access rights user has for the dataset (Permission level)", "enum": [ "None", - "Member", - "Admin", - "Contributor", - "Viewer" + "Read", + "ReadWrite", + "ReadReshare", + "ReadWriteReshare", + "ReadExplore", + "ReadReshareExplore", + "ReadWriteExplore", + "ReadWriteReshareExplore" ], "x-ms-enum": { - "name": "GroupUserAccessRight", + "name": "DatasetUserAccessRight", "modelAsExtensible": true, "values": [ { "value": "None", - "description": "Removes permission to content in workspace" + "description": "Removes permission to content in dataset" }, { - "value": "Member", - "description": "Grants Read, Reshare and Explore access to content in workspace" + "value": "Read", + "description": "Grants Read access to content in dataset" }, { - "value": "Admin", - "description": "Grants administrator rights to workspace" + "value": "ReadWrite", + "description": "Grants Read and Write access to content in dataset" }, { - "value": "Contributor", - "description": "Grants Read and Explore access to content in group" + "value": "ReadReshare", + "description": "Grants Read and Reshare access to content in dataset" }, { - "value": "Viewer", - "description": "Grants Read only access to content in group" + "value": "ReadWriteReshare", + "description": "Grants Read, Write and Reshare access to content in dataset" + }, + { + "value": "ReadExplore", + "description": "Grants Read and Explore access to content in dataset" + }, + { + "value": "ReadReshareExplore", + "description": "Grants Read, Reshare and Explore access to content in dataset" + }, + { + "value": "ReadWriteExplore", + "description": "Grants Read, Write and Explore access to content in dataset" + }, + { + "value": "ReadWriteReshareExplore", + "description": "Grants Read, Write, Reshare and Explore access to content in dataset" } ] } @@ -16367,35 +18596,138 @@ }, "identifier": { "type": "string", - "description": "[Object ID](/power-bi/developer/embedded/embedded-troubleshoot#what-is-the-difference-between-application-object-id-and-principal-object-id) of the principal" + "description": "Identifier of the principal" + }, + "graphId": { + "type": "string", + "description": "Identifier of the principal in Microsoft Graph. Only available for admin APIs." }, "principalType": { + "$ref": "#/definitions/PrincipalType" + } + } + }, + "DataflowUser": { + "required": [ + "dataflowUserAccessRight" + ], + "description": "A Power BI user access right entry for dataflow", + "properties": { + "DataflowUserAccessRight": { "type": "string", - "description": "The principal type", + "description": "Access rights user has for the dataflow (Permission level)", "enum": [ - "User", - "Group", - "App" + "None", + "Read", + "ReadWrite", + "ReadReshare", + "Owner" ], "x-ms-enum": { - "name": "PrincipalType", + "name": "DataflowUserAccessRight", "modelAsExtensible": true, "values": [ { - "value": "User", - "description": "User principal type" + "value": "None", + "description": "Removes permission to content in dataflow" + }, + { + "value": "Read", + "description": "Grants Read access to content in dataflow" + }, + { + "value": "ReadWrite", + "description": "Grants Read and Write access to content in dataflow" }, { - "value": "Group", - "description": "Group principal type" + "value": "ReadReshare", + "description": "Grants Read and Reshare access to content in dataflow" }, { - "value": "App", - "description": "Service principal type" + "value": "Owner", + "description": "Grants Read, Write and Reshare access to content in dataflow" } ] } - } + }, + "emailAddress": { + "type": "string", + "description": "Email address of the user" + }, + "displayName": { + "type": "string", + "description": "Display name of the principal" + }, + "identifier": { + "type": "string", + "description": "Identifier of the principal" + }, + "graphId": { + "type": "string", + "description": "Identifier of the principal in Microsoft Graph. Only available for admin APIs." + }, + "principalType": { + "$ref": "#/definitions/PrincipalType" + } + } + }, + "ArtifactAccessEntry": { + "required": [ + "artifactId", + "displayName", + "artifactType", + "accessRight" + ], + "description": "A Power BI artifact access entry for user", + "properties": { + "artifactId": { + "type": "string", + "description": "Artifact ID" + }, + "displayName": { + "type": "string", + "description": "Display name of the artifact" + }, + "artifactType": { + "type": "string", + "description": "Type of the artifact" + }, + "accessRight": { + "type": "string", + "description": "Access right that the user has for the artifact." + } + } + }, + "PrincipalType": { + "type": "string", + "description": "The principal type", + "enum": [ + "None", + "User", + "Group", + "App" + ], + "x-ms-enum": { + "name": "PrincipalType", + "modelAsExtensible": true, + "values": [ + { + "value": "None", + "description": "None principal type, used for whole organization level access." + }, + { + "value": "User", + "description": "User principal type" + }, + { + "value": "Group", + "description": "Group principal type" + }, + { + "value": "App", + "description": "Service principal type" + } + ] } }, "CloneReportRequest": { @@ -16411,11 +18743,11 @@ "targetWorkspaceId": { "type": "string", "format": "uuid", - "description": "Optional parameter for specifying the target workspace id. Empty Guid (00000000-0000-0000-0000-000000000000) indicates 'My Workspace'.
    If not provided, the new report will be cloned within the same workspace as the source report." + "description": "Optional parameter for specifying the target workspace ID. Empty Guid (00000000-0000-0000-0000-000000000000) indicates 'My Workspace'.
    If not provided, the new report will be cloned within the same workspace as the source report." }, "targetModelId": { "type": "string", - "description": "Optional parameter for specifying the target associated dataset id.
    If not provided, the new report will be associated with the same dataset as the source report" + "description": "Optional parameter for specifying the target associated dataset ID.
    If not provided, the new report will be associated with the same dataset as the source report" } } }, @@ -16725,7 +19057,7 @@ "properties": { "id": { "type": "string", - "description": "Dataset Id" + "description": "The dataset ID" } } }, @@ -16737,1164 +19069,1686 @@ "properties": { "id": { "type": "string", - "format": "uuid", - "description": "Workspace Id" - } - } - }, - "GenerateTokenRequestV2Report": { - "required": [ - "id" - ], - "description": "The report object for Generate Token Request V2.", - "properties": { - "allowEdit": { - "type": "boolean", - "description": "Indicates that the generated EmbedToken grand editing for this report" + "format": "uuid", + "description": "The workspace ID" + } + } + }, + "GenerateTokenRequestV2Report": { + "required": [ + "id" + ], + "description": "The report object for Generate Token Request V2.", + "properties": { + "allowEdit": { + "type": "boolean", + "description": "Indicates that the generated EmbedToken grand editing for this report" + }, + "id": { + "type": "string", + "format": "uuid", + "description": "The report ID" + } + } + }, + "GenerateTokenRequest": { + "description": "Power BI Generate Token Request", + "properties": { + "accessLevel": { + "type": "string", + "description": "Required access level for EmbedToken generation", + "enum": [ + "View", + "Edit", + "Create" + ], + "x-ms-enum": { + "name": "TokenAccessLevel", + "modelAsExtensible": true, + "values": [ + { + "value": "View", + "description": "Indicates that the generated EmbedToken should grant only Viewing permissions" + }, + { + "value": "Edit", + "description": "Indicates that the generated EmbedToken should grant Viewing and Editing permissions, only applies when generating EmbedToken for report embedding" + }, + { + "value": "Create", + "description": "Indicates that the generated EmbedToken should grant Creation permissions, only applies when generating EmbedToken for report creation" + } + ] + } + }, + "datasetId": { + "type": "string", + "description": "The dataset ID used for report creation. Only applies when generating an EmbedToken for report creation." + }, + "allowSaveAs": { + "type": "boolean", + "description": "Indicates an embedded report can be saved as a new report. Default value is 'false'. Only applies when generating EmbedToken for report embedding." + }, + "identities": { + "type": "array", + "description": "List of identities to use for RLS rules.", + "items": { + "$ref": "#/definitions/EffectiveIdentity" + } + } + } + }, + "GenerateTokenRequestV2": { + "description": "Power BI Generate Token Request V2", + "properties": { + "datasets": { + "type": "array", + "description": "List of datasets", + "items": { + "$ref": "#/definitions/GenerateTokenRequestV2Dataset" + } + }, + "reports": { + "type": "array", + "description": "List of reports", + "items": { + "$ref": "#/definitions/GenerateTokenRequestV2Report" + } + }, + "targetWorkspaces": { + "type": "array", + "description": "List of workspaces *Embed Token* allows saving to", + "items": { + "$ref": "#/definitions/GenerateTokenRequestV2TargetWorkspace" + } + }, + "identities": { + "type": "array", + "description": "List of identities to use for RLS rules.", + "items": { + "$ref": "#/definitions/EffectiveIdentity" + } + } + } + }, + "EmbedToken": { + "required": [ + "token", + "tokenId", + "expiration" + ], + "description": "Power BI embed token", + "properties": { + "token": { + "type": "string", + "description": "Embed token" + }, + "tokenId": { + "type": "string", + "format": "uuid", + "description": "The unique token ID, which can be used to correlate operations that use this token with the generate operation through audit logs" + }, + "expiration": { + "type": "string", + "format": "date-time", + "description": "Expiration time of token. In UTC." + } + } + }, + "CloneTileRequest": { + "required": [ + "targetDashboardId" + ], + "description": "Power BI clone tile request", + "properties": { + "targetDashboardId": { + "type": "string", + "format": "uuid", + "description": "The target dashboard ID" + }, + "targetWorkspaceId": { + "type": "string", + "format": "uuid", + "description": "Optional parameter for specifying the target workspace ID. Empty Guid (00000000-0000-0000-0000-000000000000) indicates 'My Workspace'.
    If not provided, tile will be cloned within the same workspace as the source tile." + }, + "targetReportId": { + "type": "string", + "format": "uuid", + "description": "Optional parameter
    When cloning a tile linked to a report, pass the target report ID to rebind the new tile to a different report." + }, + "targetModelId": { + "type": "string", + "description": "Optional parameter
    When cloning a tile linked to a dataset, pass the target model ID to rebind the new tile to a different dataset." + }, + "positionConflictAction": { + "type": "string", + "description": "Optional parameter for specifying the action in case of position conflict.
    If not provided, 'Tail' is used.
    If there is no conflict, clone tile to same position as in source.", + "enum": [ + "Tail", + "Abort" + ], + "x-ms-enum": { + "name": "positionConflictAction", + "modelAsExtensible": true, + "values": [ + { + "value": "Tail", + "description": "Tile will be added at the end of the chosen dashboard" + }, + { + "value": "Abort", + "description": "In a case of position conflict, the request will be aborted" + } + ] + } + } + } + }, + "AddDashboardRequest": { + "required": [ + "name" + ], + "description": "Power BI add dashboard request", + "properties": { + "name": { + "type": "string", + "description": "The name of the new dashboard" + } + } + }, + "SourceReport": { + "required": [ + "sourceReportId" + ], + "description": "Source from existing report", + "properties": { + "sourceReportId": { + "type": "string", + "format": "uuid", + "description": "The source report ID" + }, + "sourceWorkspaceId": { + "type": "string", + "format": "uuid", + "description": "The source workspace ID" + } + } + }, + "UpdateReportContentRequest": { + "required": [ + "sourceType", + "sourceReport" + ], + "description": "Power BI update report content request", + "properties": { + "sourceType": { + "type": "string", + "description": "The source type for the content update.", + "enum": [ + "ExistingReport" + ], + "x-ms-enum": { + "name": "sourceType", + "modelAsExtensible": true, + "values": [ + { + "value": "ExistingReport", + "description": "Use an existing report as a source for updating the content of a target report." + } + ] + } + }, + "sourceReport": { + "$ref": "#/definitions/SourceReport" + } + } + }, + "Capacity": { + "required": [ + "id", + "state", + "capacityUserAccessRight" + ], + "description": "A Power BI capacity", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "The capacity ID" + }, + "displayName": { + "type": "string", + "description": "The capacity display name" + }, + "admins": { + "type": "array", + "description": "An array of capacity admins.", + "items": { + "type": "string" + } + }, + "sku": { + "type": "string", + "description": "The capacity SKU." }, - "id": { + "state": { "type": "string", - "format": "uuid", - "description": "Report Id" - } - } - }, - "GenerateTokenRequest": { - "description": "Power BI Generate Token Request", - "properties": { - "accessLevel": { + "description": "The capacity state", + "enum": [ + "NotActivated", + "Active", + "Provisioning", + "ProvisionFailed", + "PreSuspended", + "Suspended", + "Deleting", + "Deleted", + "Invalid", + "UpdatingSku" + ], + "x-ms-enum": { + "name": "CapacityState", + "modelAsExtensible": true, + "values": [ + { + "value": "NotActivated", + "description": "Not Supported" + }, + { + "value": "Active", + "description": "Capacity ready for use" + }, + { + "value": "Provisioning", + "description": "Capacity in activation process" + }, + { + "value": "ProvisionFailed", + "description": "Capacity failed to provisioned" + }, + { + "value": "Suspended", + "description": "Capacity suspended for use" + }, + { + "value": "PreSuspended", + "description": "Not Supported" + }, + { + "value": "Deleting", + "description": "Capacity in process of being deleted" + }, + { + "value": "Deleted", + "description": "Capacity has been deleted and is not available" + }, + { + "value": "Invalid", + "description": "Capacity can not be used" + }, + { + "value": "UpdatingSku", + "description": "Capacity Sku change is in progress" + } + ] + } + }, + "capacityUserAccessRight": { "type": "string", - "description": "Required access level for EmbedToken generation", + "description": "Access right user has on the capacity", "enum": [ - "View", - "Edit", - "Create" + "None", + "Assign", + "Admin" ], "x-ms-enum": { - "name": "TokenAccessLevel", + "name": "capacityUserAccessRight", "modelAsExtensible": true, "values": [ { - "value": "View", - "description": "Indicates that the generated EmbedToken should grant only Viewing permissions" + "value": "None", + "description": "User doesn't have access to the capacity" }, { - "value": "Edit", - "description": "Indicates that the generated EmbedToken should grant Viewing and Editing permissions, only applies when generating EmbedToken for report embedding" + "value": "Assign", + "description": "User has contributor rights and can assign workspaces to the capacity" }, { - "value": "Create", - "description": "Indicates that the generated EmbedToken should grant Creation permissions, only applies when generating EmbedToken for report creation" + "value": "Admin", + "description": "User has administrator rights on the capacity" } ] } }, - "datasetId": { + "region": { "type": "string", - "description": "Dataset id for report creation. Only applies when generating EmbedToken for report creation." + "description": "The Azure region where the capacity is provisioned" }, - "allowSaveAs": { - "type": "boolean", - "description": "Indicates an embedded report can be saved as a new report. Default value is 'false'. Only applies when generating EmbedToken for report embedding." + "tenantKeyId": { + "type": "string", + "format": "uuid", + "description": "The ID of an encryption key (only applicable to the admin route)" }, - "identities": { - "type": "array", - "description": "List of identities to use for RLS rules.", - "items": { - "$ref": "#/definitions/EffectiveIdentity" - } + "tenantKey": { + "$ref": "#/definitions/TenantKey", + "description": "Encryption key information (Only applicable for admin route)" } } }, - "GenerateTokenRequestV2": { - "description": "Power BI Generate Token Request V2", + "Capacities": { + "description": "Odata response wrapper for a Power BI capacity list", "properties": { - "datasets": { - "type": "array", - "description": "List of datasets", - "items": { - "$ref": "#/definitions/GenerateTokenRequestV2Dataset" - } - }, - "reports": { - "type": "array", - "description": "List of reports", - "items": { - "$ref": "#/definitions/GenerateTokenRequestV2Report" - } + "odata.context": { + "type": "string" }, - "targetWorkspaces": { + "value": { "type": "array", - "description": "List of workspaces *Embed Token* allows saving to", + "description": "The Capacity List", "items": { - "$ref": "#/definitions/GenerateTokenRequestV2TargetWorkspace" + "$ref": "#/definitions/Capacity" } + } + } + }, + "AvailableFeatures": { + "description": "Odata response wrapper for a Power BI available features list", + "properties": { + "odata.context": { + "type": "string" }, - "identities": { + "features": { "type": "array", - "description": "List of identities to use for RLS rules.", + "description": "The available features list", "items": { - "$ref": "#/definitions/EffectiveIdentity" + "$ref": "#/definitions/AvailableFeature" } } } }, - "EmbedToken": { + "AvailableFeature": { "required": [ - "token", - "tokenId", - "expiration" + "name", + "state", + "extendedState" ], - "description": "Power BI embed token", + "description": "Power BI available feature", "properties": { - "token": { + "name": { "type": "string", - "description": "Embed token" + "description": "The feature name" }, - "tokenId": { + "state": { "type": "string", - "format": "uuid", - "description": "Unique token Id. Can be used to correlate operations that use this token with the generate operation through audit logs." + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "FeatureState", + "modelAsExtensible": true + }, + "description": "The feature state" }, - "expiration": { + "extendedState": { "type": "string", - "format": "date-time", - "description": "Expiration time of token. In UTC." + "enum": [ + "Enabled", + "DisabledByAdmin", + "UserNotLicensed" + ], + "x-ms-enum": { + "name": "FeatureExtendedState", + "modelAsExtensible": true + }, + "description": "The feature extended state" + }, + "additionalInfo": { + "description": "Additional feature information", + "$ref": "#/definitions/AdditionalFeatureInfo" } } }, - "CloneTileRequest": { + "AdditionalFeatureInfo": { + "description": "Additional feature information", + "properties": { + "Usage": { + "type": "integer", + "description": "The token generation usage (in %) from the limitation on shared capacity" + } + } + }, + "AssignToCapacityRequest": { "required": [ - "targetDashboardId" + "capacityId" ], - "description": "Power BI clone tile request", + "description": "Power BI assign to capacity request", "properties": { - "targetDashboardId": { - "type": "string", - "format": "uuid", - "description": "The target dashboard id" - }, - "targetWorkspaceId": { - "type": "string", - "format": "uuid", - "description": "Optional parameter for specifying the target workspace id. Empty Guid (00000000-0000-0000-0000-000000000000) indicates 'My Workspace'.
    If not provided, tile will be cloned within the same workspace as the source tile." - }, - "targetReportId": { + "capacityId": { "type": "string", "format": "uuid", - "description": "Optional parameter
    When cloning a tile linked to a report, pass the target report id to rebind the new tile to a different report." - }, - "targetModelId": { - "type": "string", - "description": "Optional parameter
    When cloning a tile linked to a dataset, pass the target model id to rebind the new tile to a different dataset." - }, - "positionConflictAction": { + "description": "The capacity ID. To unassign from capacity, use an Empty Guid (`00000000-0000-0000-0000-000000000000`)." + } + } + }, + "WorkspaceCapacityAssignmentStatus": { + "required": [ + "status" + ], + "description": "Power BI workspace assignment status to capacity response", + "properties": { + "status": { "type": "string", - "description": "Optional parameter for specifying the action in case of position conflict.
    If not provided, 'Tail' is used.
    If there is no conflict, clone tile to same position as in source.", + "description": "Workspace assignment status", "enum": [ - "Tail", - "Abort" + "Pending", + "InProgress", + "CompletedSuccessfully", + "AssignmentFailed" ], "x-ms-enum": { - "name": "positionConflictAction", + "name": "AssignmentStatus", "modelAsExtensible": true, "values": [ { - "value": "Tail", - "description": "Tile will be added at the end of the chosen dashboard" + "value": "Pending", + "description": "Assignment request was initiated, but was not started yet" }, { - "value": "Abort", - "description": "In a case of position conflict, the request will be aborted" + "value": "InProgress", + "description": "Assignment operation is in progress" + }, + { + "value": "CompletedSuccessfully", + "description": "Assignment operation was completed successfully" + }, + { + "value": "AssignmentFailed", + "description": "Assignment failed" } ] } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Start time of workspace assignment operation" + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "End time of workspace assignment operation" + }, + "capacityId": { + "type": "string", + "format": "uuid", + "description": "The capacity ID" + }, + "activityId": { + "type": "string", + "format": "uuid", + "description": "The activity ID of the assignment operation, which can be provided in case of assignment failures" } } }, - "AddDashboardRequest": { + "TemporaryUploadLocation": { "required": [ - "name" + "Url", + "ExpirationTime" ], - "description": "Power BI add dashboard request", + "description": "Power BI update report content request", "properties": { - "name": { + "Url": { "type": "string", - "description": "The name of the new dashboard" + "description": "The shared access signature (SAS) url for the temporary blob storage" + }, + "ExpirationTime": { + "type": "string", + "format": "date-time", + "description": "The expiration time of the shared access signature (SAS) url" } } }, - "SourceReport": { + "Workloads": { + "description": "Odata response wrapper for capacity workload settings list", + "properties": { + "odata.context": { + "type": "string" + }, + "value": { + "type": "array", + "description": "The capacity workload settings list", + "items": { + "$ref": "#/definitions/Workload" + } + } + } + }, + "WorkloadState": { + "type": "string", + "enum": [ + "Disabled", + "Enabled", + "Unsupported" + ], + "x-ms-enum": { + "name": "WorkloadState", + "modelAsExtensible": true, + "values": [ + { + "value": "Disabled", + "description": "The workload is disabled" + }, + { + "value": "Enabled", + "description": "The workload is enabled" + }, + { + "value": "Unsupported", + "description": "The workload is unsupported by the current capacity SKU and cannot be enabled. This value cannot be set by the user in the [Patch Workload](/rest/api/power-bi/capacities/patchworkload)" + } + ] + }, + "description": "The capacity workload state" + }, + "Workload": { "required": [ - "sourceReportId" + "state" ], - "description": "Source from existing report", + "description": "Capacity workload setting", "properties": { - "sourceReportId": { + "name": { "type": "string", - "format": "uuid", - "description": "source report id" + "description": "The workload name" }, - "sourceWorkspaceId": { - "type": "string", - "format": "uuid", - "description": "source worksapce id" + "state": { + "$ref": "#/definitions/WorkloadState" + }, + "maxMemoryPercentageSetByUser": { + "type": "integer", + "description": "The memory percentage maximum Limit set by the user" } } }, - "UpdateReportContentRequest": { + "PatchWorkloadRequest": { "required": [ - "sourceType", - "sourceReport" + "state" ], - "description": "Power BI update report content request", + "description": "Patch workload setting request", "properties": { - "sourceType": { - "type": "string", - "description": "The source type for the content update.", - "enum": [ - "ExistingReport" - ], - "x-ms-enum": { - "name": "sourceType", - "modelAsExtensible": true, - "values": [ - { - "value": "ExistingReport", - "description": "Use an existing report as a source for updating the content of a target report." - } - ] - } + "state": { + "$ref": "#/definitions/WorkloadState" }, - "sourceReport": { - "$ref": "#/definitions/SourceReport" + "maxMemoryPercentageSetByUser": { + "type": "integer", + "description": "The memory percentage maximum Limit set by the user" } } }, - "Capacity": { + "Dataflow": { "required": [ - "id", - "state", - "capacityUserAccessRight" + "objectId" ], - "description": "A Power BI capacity", + "description": "The metadata of a dataflow. Below is a list of properties that may be returned for a dataflow. Only a subset of the properties will be returned depending on the API called, the caller permissions and the availability of the data in the Power BI database.", "properties": { - "id": { + "objectId": { "type": "string", "format": "uuid", - "description": "The capacity id" + "description": "The dataflow ID" }, - "displayName": { + "name": { "type": "string", - "description": "The capacity display name" - }, - "admins": { - "type": "array", - "description": "An array of capacity admins.", - "items": { - "type": "string" - } + "description": "The dataflow name" }, - "sku": { + "description": { "type": "string", - "description": "The capacity SKU." + "description": "The dataflow description" }, - "state": { + "modelUrl": { "type": "string", - "description": "The capacity state", - "enum": [ - "NotActivated", - "Active", - "Provisioning", - "ProvisionFailed", - "PreSuspended", - "Suspended", - "Deleting", - "Deleted", - "Invalid", - "UpdatingSku" - ], - "x-ms-enum": { - "name": "CapacityState", - "modelAsExtensible": true, - "values": [ - { - "value": "NotActivated", - "description": "Not Supported" - }, - { - "value": "Active", - "description": "Capacity ready for use" - }, - { - "value": "Provisioning", - "description": "Capacity in activation process" - }, - { - "value": "ProvisionFailed", - "description": "Capacity failed to provisioned" - }, - { - "value": "Suspended", - "description": "Capacity suspended for use" - }, - { - "value": "PreSuspended", - "description": "Not Supported" - }, - { - "value": "Deleting", - "description": "Capacity in process of being deleted" - }, - { - "value": "Deleted", - "description": "Capacity has been deleted and is not available" - }, - { - "value": "Invalid", - "description": "Capacity can not be used" - }, - { - "value": "UpdatingSku", - "description": "Capacity Sku change is in progress" - } - ] - } + "description": "A URL to the dataflow definition file (model.json)" }, - "capacityUserAccessRight": { + "configuredBy": { "type": "string", - "description": "Access right user has on the capacity", - "enum": [ - "None", - "Assign", - "Admin" - ], - "x-ms-enum": { - "name": "capacityUserAccessRight", - "modelAsExtensible": true, - "values": [ - { - "value": "None", - "description": "User doesn't have access to the capacity" - }, - { - "value": "Assign", - "description": "User can assign workspaces to the capacity" - }, - { - "value": "Admin", - "description": "User has administrator rights on the capacity" - } - ] - } + "description": "The dataflow owner" }, - "region": { + "modifiedBy": { "type": "string", - "description": "The Azure region where the capacity is provisioned" + "description": "The user that modified this dataflow" }, - "tenantKeyId": { + "endorsementDetails": { + "$ref": "#/definitions/EndorsementDetails", + "description": "The dataflow endorsement details" + }, + "modifiedDateTime": { "type": "string", - "format": "uuid", - "description": "The id of the encryption key (Only applicable for admin route)" + "format": "date-time", + "description": "modification date time" }, - "tenantKey": { - "$ref": "#/definitions/TenantKey", - "description": "Encryption key information (Only applicable for admin route)" - } - } - }, - "Capacities": { - "description": "Odata response wrapper for a Power BI capacity list", - "properties": { - "odata.context": { - "type": "string" + "datasourceUsages": { + "type": "array", + "description": "Datasource usages", + "items": { + "$ref": "#/definitions/DatasourceUsage" + } }, - "value": { + "upstreamDataflows": { "type": "array", - "description": "The Capacity List", + "description": "Upstream Dataflows", "items": { - "$ref": "#/definitions/Capacity" + "$ref": "#/definitions/DependentDataflow" + } + }, + "sensitivityLabel": { + "$ref": "#/definitions/SensitivityLabel", + "description": "The dataflow sensitivity label" + + }, + "users": { + "type": "array", + "description": "The Dataflow User Access Details. This value will be empty. It will be removed from the payload response in an upcoming release. To retrieve user information on an artifact, please consider using the Get Dataflow User as Admin APIs, or the PostWorkspaceInfo API with the getArtifactUser parameter.", + "items": { + "$ref": "#/definitions/DataflowUser" } } } }, - "AvailableFeatures": { - "description": "Odata response wrapper for a Power BI available features list", + "Dataflows": { + "description": "Odata response wrapper for a dataflow metadata list", "properties": { "odata.context": { "type": "string" }, - "features": { + "value": { "type": "array", - "description": "The available features list", + "description": "The dataflow metadata List", "items": { - "$ref": "#/definitions/AvailableFeature" + "$ref": "#/definitions/Dataflow" } } } }, - "AvailableFeature": { + "DataflowStorageAccount": { "required": [ - "name", - "state", - "extendedState" + "id", + "isEnabled" ], - "description": "Power BI available feature", + "description": "A Power BI dataflow storage account", "properties": { - "name": { - "type": "string", - "description": "The feature name" - }, - "state": { + "id": { "type": "string", - "enum": [ - "Enabled", - "Disabled" - ], - "x-ms-enum": { - "name": "FeatureState", - "modelAsExtensible": true - }, - "description": "The feature state" + "format": "uuid", + "description": "The Power BI dataflow storage account ID" }, - "extendedState": { + "name": { "type": "string", - "enum": [ - "Enabled", - "DisabledByAdmin", - "UserNotLicensed" - ], - "x-ms-enum": { - "name": "FeatureExtendedState", - "modelAsExtensible": true - }, - "description": "The feature extended state" + "description": "The Power BI dataflow storage account name" }, - "additionalInfo": { - "description": "Additional feature information", - "$ref": "#/definitions/AdditionalFeatureInfo" + "isEnabled": { + "type": "boolean", + "description": "Indicates if workspaces can be assigned to this storage account" } } }, - "AdditionalFeatureInfo": { - "description": "Additional feature information", + "DataflowStorageAccounts": { + "description": "Odata response wrapper for Power BI dataflow storage account list", "properties": { - "Usage": { - "type": "integer", - "description": "The token generation usage (in %) from the limitation on shared capacity" + "odata.context": { + "type": "string" + }, + "value": { + "type": "array", + "description": "The Power BI dataflow storage account list", + "items": { + "$ref": "#/definitions/DataflowStorageAccount" + } } } }, - "AssignToCapacityRequest": { + "AssignToDataflowStorageRequest": { "required": [ - "capacityId" + "dataflowStorageId" ], - "description": "Power BI assign to capacity request", + "description": "Power BI assign to Power BI dataflow storage account request", "properties": { - "capacityId": { + "dataflowStorageId": { "type": "string", "format": "uuid", - "description": "The capacity id. To unassign from capacity, use Empty Guid (00000000-0000-0000-0000-000000000000)." + "description": "The Power BI dataflow storage account ID. To unassign the specified workspace from a Power BI dataflow storage account, use an empty GUID (`00000000-0000-0000-0000-000000000000`)." } } }, - "WorkspaceCapacityAssignmentStatus": { - "required": [ - "status" - ], - "description": "Power BI workspace assignment status to capacity response", + "Export": { + "description": "An object describing Export to file details and current state", "properties": { + "id": { + "type": "string", + "description": "The Export to file job ID" + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "The start time of the Export to file job" + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "The time of last change in the Export to file job" + }, + "reportId": { + "type": "string", + "format": "uuid", + "description": "The ID of the exported report" + }, + "reportName": { + "type": "string", + "description": "The name of the exported report" + }, "status": { "type": "string", - "description": "Workspace assignment status", + "description": "The current state of the Export to file job", "enum": [ - "Pending", - "InProgress", - "CompletedSuccessfully", - "AssignmentFailed" + "Undefined", + "NotStarted", + "Running", + "Succeeded", + "Failed" ], "x-ms-enum": { - "name": "AssignmentStatus", - "modelAsExtensible": true, + "name": "ExportState", "values": [ { - "value": "Pending", - "description": "Assignment request was initiated, but was not started yet" + "value": "Undefined", + "description": "Indicates that the state of the Export to file job is undefined" }, { - "value": "InProgress", - "description": "Assignment operation is in progress" + "value": "NotStarted", + "description": "Indicates that the Export to file job did not start" }, { - "value": "CompletedSuccessfully", - "description": "Assignment operation was completed successfully" + "value": "Running", + "description": "Indicates that the Export to file job is running" }, { - "value": "AssignmentFailed", - "description": "Assignment failed" + "value": "Succeeded", + "description": "Indicates that the Export to file job finished succesfully" + }, + { + "value": "Failed", + "description": "Indicates that the Export to file job failed" } ] } }, - "startTime": { + "percentComplete": { + "type": "integer", + "description": "Indicate job progress as percentage", + "format": "int32", + "minimum": 0, + "maximum": 100 + }, + "resourceLocation": { + "type": "string", + "description": "The URL for retrieving the exported file" + }, + "ResourceFileExtension": { + "type": "string", + "description": "The extension of the exported file" + }, + "expirationTime": { + "type": "string", + "format": "date-time", + "description": "The expiration time of the URL" + } + } + }, + "TenantKeyCreationRequest": { + "description": "Add encryption key request", + "properties": { + "name": { + "type": "string", + "description": "The name of the encryption key" + }, + "keyVaultKeyIdentifier": { + "type": "string", + "description": "The URI that uniquely specifies an encryption key in Azure Key Vault." + }, + "isDefault": { + "type": "boolean", + "description": "Whether an encryption key is the default key for the entire tenant. Any newly created capacity inherits the default key." + }, + "activate": { + "type": "boolean", + "description": "Indicates to activate any inactivated capacities to use this key for its encryption" + } + } + }, + "TenantKeys": { + "description": "Encryption keys information", + "properties": { + "odata.context": { + "type": "string" + }, + "value": { + "type": "array", + "description": "Encryption keys", + "items": { + "$ref": "#/definitions/TenantKey" + } + } + } + }, + "TenantKey": { + "description": "Encryption key information", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "The ID of the encryption key" + }, + "name": { + "type": "string", + "description": "The name of the encryption key" + }, + "keyVaultKeyIdentifier": { + "type": "string", + "description": "The URI that uniquely specifies the encryption key in Azure Key Vault" + }, + "isDefault": { + "type": "boolean", + "description": "Whether the encryption key is the default key for the entire tenant. Any newly created capacity inherits the default key." + }, + "createdAt": { "type": "string", "format": "date-time", - "description": "Start time of workspace assignment operation" + "description": "The creation time of the encryption key" }, - "endTime": { + "updatedAt": { "type": "string", "format": "date-time", - "description": "End time of workspace assignment operation" - }, - "capacityId": { + "description": "The last update time of the encryption key" + } + } + }, + "TenantKeyRotationRequest": { + "description": "Request to rotate an encryption key", + "properties": { + "keyVaultKeyIdentifier": { + "type": "string", + "description": "The URI that uniquely specifies the encryption key in Azure Key Vault" + } + } + }, + "CapacityPatchRequest": { + "description": "Patch capacity request", + "properties": { + "tenantKeyId": { "type": "string", "format": "uuid", - "description": "The capacity id" + "description": "The ID of the encryption key" + } + } + }, + "AssignWorkspacesToCapacityRequest": { + "description": "Request body for assigning workspaces to a premium capacity as tenant admin", + "properties": { + "capacityMigrationAssignments": { + "type": "array", + "items": { + "$ref": "#/definitions/CapacityMigrationAssignment" + } + } + } + }, + "CapacityMigrationAssignment": { + "required": [ + "workspacesToAssign", + "targetCapacityObjectId" + ], + "description": "Assignment contract for migrating workspaces to premium capacity as tenant admin", + "properties": { + "workspacesToAssign": { + "type": "array", + "description": "The workspace IDs to be migrated to premium capacity", + "items": { + "type": "string", + "description": "The workspace ID" + } }, - "activityId": { + "targetCapacityObjectId": { "type": "string", - "format": "uuid", - "description": "The activity id of the acctual assignment operation, can be provided in case of assignment failures" + "description": "The premium capacity ID" } } }, - "TemporaryUploadLocation": { + "UnassignWorkspacesCapacityRequest": { "required": [ - "Url", - "ExpirationTime" + "workspacesToUnassign" ], - "description": "Power BI update report content request", + "description": "Request body for migrating workspaces to shared capacity as tenant admin", "properties": { - "Url": { + "workspacesToUnassign": { + "type": "array", + "description": "Workspaces to be migrated to shared capacity", + "items": { + "type": "string", + "description": "The workspace ID" + } + } + } + }, + "ActivityEventResponse": { + "description": "Odata response wrapper for audit activity events list", + "properties": { + "activityEventEntities": { + "type": "array", + "description": "The activity event entities", + "items": { + "$ref": "#/definitions/Object" + } + }, + "continuationUri": { "type": "string", - "description": "The shared access signature (SAS) url for the temporary blob storage" + "description": "The URI for the next chunk in the result set" }, - "ExpirationTime": { + "continuationToken": { "type": "string", - "format": "date-time", - "description": "The expiration time of the shared access signature (SAS) url" + "description": "Token to get the next chunk of the result set" } } }, - "Workloads": { - "description": "Odata response wrapper for capacity workload settings list", + "Workbooks": { + "description": "Power BI workbook list", "properties": { "odata.context": { - "type": "string" + "type": "string", + "description": "OData context" }, "value": { "type": "array", - "description": "The capacity workload settings list", + "description": "The workbooks", "items": { - "$ref": "#/definitions/Workload" + "$ref": "#/definitions/Workbook" } } } }, - "WorkloadState": { - "type": "string", - "enum": [ - "Disabled", - "Enabled", - "Unsupported" - ], - "x-ms-enum": { - "name": "WorkloadState", - "modelAsExtensible": true, - "values": [ - { - "value": "Disabled", - "description": "The workload is disabled" - }, - { - "value": "Enabled", - "description": "The workload is enabled" - }, - { - "value": "Unsupported", - "description": "The workload is unsupported by the current capacity SKU and cannot be enabled. This value cannot be set by the user in the [Patch Workload](/rest/api/power-bi/capacities/patchworkload)" - } - ] - }, - "description": "The capacity workload state" - }, - "Workload": { - "required": [ - "state" - ], - "description": "Capacity workload setting", + "Workbook": { + "description": "A Power BI workbook", "properties": { "name": { "type": "string", - "description": "The workload name" - }, - "state": { - "$ref": "#/definitions/WorkloadState" + "description": "The workbook name" }, - "maxMemoryPercentageSetByUser": { - "type": "integer", - "description": "The memory percentage maximum Limit set by the user" + "datasetId": { + "type": "string", + "description": "DatasetId for workbooks. Only applies for workbooks that has an associated dataset." } } }, - "PatchWorkloadRequest": { - "required": [ - "state" - ], - "description": "Patch workload setting request", + "Refreshables": { + "description": "Power BI refreshable list", "properties": { - "state": { - "$ref": "#/definitions/WorkloadState" + "odata.context": { + "type": "string", + "description": "OData context" }, - "maxMemoryPercentageSetByUser": { - "type": "integer", - "description": "The memory percentage maximum Limit set by the user" + "value": { + "type": "array", + "description": "The refreshables", + "items": { + "$ref": "#/definitions/Refreshable" + } } } }, - "Dataflow": { - "required": [ - "objectId" - ], - "description": "The metadata of a dataflow. Below is a list of properties that may be returned for a dataflow. Only a subset of the properties will be returned depending on the API called, the caller permissions and the availability of the data in the Power BI database.", + "Refreshable": { + "description": "A Power BI refreshable", "properties": { - "objectId": { + "id": { "type": "string", - "format": "uuid", - "description": "The dataflow id" + "description": "The object ID of the refreshable" }, "name": { "type": "string", - "description": "The dataflow name" + "description": "Display name of refreshable" }, - "description": { + "kind": { "type": "string", - "description": "The dataflow description" + "description": "The refreshable kind", + "enum": [ + "Dataset" + ], + "x-ms-enum": { + "name": "RefreshableKind", + "modelAsExtensible": true, + "values": [ + { + "value": "Dataset", + "description": "Dataset" + } + ] + } }, - "modelUrl": { + "startTime": { "type": "string", - "description": "A URL to the dataflow definition file (model.json)" + "format": "date-time", + "description": "The start time of the window for which summary data exists" }, - "configuredBy": { + "endTime": { "type": "string", - "description": "The dataflow owner" + "format": "date-time", + "description": "The end time of the window for which summary data exists" }, - "modifiedBy": { - "type": "string", - "description": "The user that modified this dataflow" + "refreshCount": { + "type": "integer", + "description": "The number of refreshes within the summary time window" }, - "endorsementDetails": { - "$ref": "#/definitions/EndorsementDetails", - "description": "The dataflow endorsement details" + "refreshFailures": { + "type": "integer", + "description": "The number of refresh failures within the summary time window" }, - "modifiedDateTime": { - "type": "string", - "format": "date-time", - "description": "modification date time" + "averageDuration": { + "type": "number", + "description": "The average duration in seconds of a refresh within the summary time window" }, - "datasourceUsages": { - "type": "array", - "description": "Datasource usages", - "items": { - "$ref": "#/definitions/DatasourceUsage" - } + "medianDuration": { + "type": "number", + "description": "The median duration in seconds of a refresh within the summary time window" }, - "upstreamDataflows": { + "refreshesPerDay": { + "type": "integer", + "description": "The number of refreshes (schedule+onDemand) per day within the summary time window with at most 60" + }, + "lastRefresh": { + "$ref": "#/definitions/Refresh", + "description": "The last Power BI refresh history entry for the refreshable item" + }, + "refreshSchedule": { + "$ref": "#/definitions/RefreshSchedule", + "description": "The refresh schedule for the refreshable item" + }, + "configuredBy": { "type": "array", - "description": "Upstream Dataflows", + "description": "Refreshable owners", "items": { - "$ref": "#/definitions/DependentDataflow" + "type": "string" } }, - "sensitivityLabel": { - "$ref": "#/definitions/SensitivityLabel", - "description": "The dataflow sensitivity label" - + "capacity": { + "$ref": "#/definitions/Capacity", + "description": "The capacity for the refreshable item" + }, + "group": { + "$ref": "#/definitions/Group", + "description": "The associated group for the refreshable item" } } }, - "Dataflows": { - "description": "Odata response wrapper for a dataflow metadata list", + "UpdateRdlDatasourcesRequest": { + "required": [ + "updateDetails" + ], + "description": "A paginated report datasources update request.", "properties": { - "odata.context": { - "type": "string" - }, - "value": { + "updateDetails": { "type": "array", - "description": "The dataflow metadata List", + "description": "The paginated report datasources update details.", "items": { - "$ref": "#/definitions/Dataflow" + "$ref": "#/definitions/UpdateRdlDatasourceDetails" } } } }, - "DataflowStorageAccount": { + "UpdateRdlDatasourceDetails": { "required": [ - "id", - "isEnabled" + "connectionDetails", + "datasourceName" ], - "description": "A Power BI dataflow storage account", + "description": "The new connection details and the target datasource name to be updated.", "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "The Power BI dataflow storage account id" + "connectionDetails": { + "$ref": "#/definitions/RdlDatasourceConnectionDetails", + "description": "The new server and database name." }, - "name": { + "datasourceName": { "type": "string", - "description": "The Power BI dataflow storage account name" + "description": "The target datasource name to be updated." + } + } + }, + "RdlDatasourceConnectionDetails": { + "description": "A paginated report datasource connection details.", + "properties": { + "server": { + "type": "string", + "description": "The connection server." }, - "isEnabled": { - "type": "boolean", - "description": "Indicates if workspaces can be assigned to this storage account" + "database": { + "type": "string", + "description": "The connection database." } } }, - "DataflowStorageAccounts": { - "description": "Odata response wrapper for Power BI dataflow storage account list", + "DataflowTransactions": { + "description": "A dataflow transaction odata list wrapper", "properties": { "odata.context": { - "type": "string" + "type": "string", + "description": "OData context" }, "value": { "type": "array", - "description": "The Power BI dataflow storage account list", + "description": "The dataflow transactions", "items": { - "$ref": "#/definitions/DataflowStorageAccount" + "$ref": "#/definitions/DataflowTransaction" } } } }, - "AssignToDataflowStorageRequest": { + "DataflowTransaction": { "required": [ - "dataflowStorageId" + "id" ], - "description": "Power BI assign to Power BI dataflow storage account request", - "properties": { - "dataflowStorageId": { - "type": "string", - "format": "uuid", - "description": "The Power BI dataflow storage account id. To unassign the specified workspace from a Power BI dataflow storage account, an empty GUID (00000000-0000-0000-0000-000000000000) should be provided as dataflowStorageId." - } - } - }, - "Export": { - "description": "An object describing Export to file details and current state", + "description": "A Power BI dataflow transaction", "properties": { "id": { "type": "string", - "description": "The Export to file job ID" + "description": "The transaction ID" }, - "createdDateTime": { + "refreshType": { "type": "string", - "format": "date-time", - "description": "The start time of the Export to file job" + "description": "The type of refresh transaction" }, - "lastActionDateTime": { + "startTime": { "type": "string", - "format": "date-time", - "description": "The time of last change in the Export to file job" + "description": "Start time of the transaction" }, - "reportId": { + "endTime": { "type": "string", - "format": "uuid", - "description": "The ID of the exported report" + "description": "End time of the transaction" }, - "reportName": { + "status": { "type": "string", - "description": "The name of the exported report" + "description": "Status of the transaction" + } + } + }, + "DataflowTransactionStatus": { + "description": "Status of dataflow refresh transaction", + "properties": { + "transactionId": { + "description": "The transaction ID", + "type": "string" }, "status": { + "description": "Status of transaction", "type": "string", - "description": "The current state of the Export to file job", "enum": [ - "Undefined", - "NotStarted", - "Running", - "Succeeded", - "Failed" - ], - "x-ms-enum": { - "name": "ExportState", - "values": [ - { - "value": "Undefined", - "description": "Indicates that the state of the Export to file job is undefined" - }, - { - "value": "NotStarted", - "description": "Indicates that the Export to file job did not start" - }, - { - "value": "Running", - "description": "Indicates that the Export to file job is running" - }, - { - "value": "Succeeded", - "description": "Indicates that the Export to file job finished succesfully" - }, - { - "value": "Failed", - "description": "Indicates that the Export to file job failed" - } - ] - } - }, - "percentComplete": { - "type": "integer", - "description": "Indicate job progress as percentage", - "format": "int32", - "minimum": 0, - "maximum": 100 - }, - "resourceLocation": { - "type": "string", - "description": "The URL for retrieving the exported file" - }, - "ResourceFileExtension": { - "type": "string", - "description": "The extension of the exported file" - }, - "expirationTime": { - "type": "string", - "format": "date-time", - "description": "The expiration time of the URL" + "invalid", + "successfullyMarked", + "alreadyConcluded", + "notFound" + ] } } }, - "TenantKeyCreationRequest": { - "description": "Add encryption key request", + "DataflowUpdateRequestMessage": { + "description": "Request payload for updating dataflow information", "properties": { "name": { - "type": "string", - "description": "The name of the encryption key" + "description": "New name of the dataflow", + "type": "string" }, - "keyVaultKeyIdentifier": { - "type": "string", - "description": "Uri to the version of the Azure Key Vault key to be used" + "description": { + "description": "New description for the dataflow", + "type": "string" }, - "isDefault": { - "type": "boolean", - "description": "Indicates that this key is set as default for the entire tenant. Any new capacity creation will inherit this key upon creation" + "allowNativeQueries": { + "description": "Allow native queries", + "type": "boolean" }, - "activate": { - "type": "boolean", - "description": "Indicates to activate any inactivated capacities to use this key for its encryption" + "computeEngineBehavior": { + "description": "Compute Engine Behavior", + "type": "string", + "enum": [ + "computeOptimized", + "computeOn", + "computeDisabled" + ] } } }, - "TenantKeys": { - "description": "Encryption keys information", + "CreateInstallTicketRequest": { + "description": "Power BI Create Install Ticket Request", "properties": { - "odata.context": { - "type": "string" - }, - "value": { + "installDetails": { "type": "array", - "description": "Encryption keys", + "description": "List of install details", "items": { - "$ref": "#/definitions/TenantKey" + "$ref": "#/definitions/TemplateAppInstallDetails" } } } }, - "TenantKey": { - "description": "Encryption key information", + "TemplateAppInstallDetails": { + "required": [ + "appId", + "packageKey", + "ownerTenantId" + ], + "description": "Power BI Template App Install Details", "properties": { - "id": { + "appId": { "type": "string", "format": "uuid", - "description": "The id of the encryption key" + "description": "The unique ID of the application" }, - "name": { + "packageKey": { "type": "string", - "description": "The name of the encryption key" + "description": "Application version secure key" }, - "keyVaultKeyIdentifier": { + "ownerTenantId": { "type": "string", - "description": "Uri to the version of the Azure Key Vault key" + "format": "uuid", + "description": "The object ID for the application owner's tenant" }, - "isDefault": { - "type": "boolean", - "description": "Indicates that this key is set as default for the entire tenant. Any new capacity creation will inherit this key upon creation" + "config": { + "$ref": "#/definitions/TemplateAppConfigurationRequest", + "description": "Automated install configuration." + } + } + }, + "TemplateAppConfigurationRequest": { + "description": "Power BI Template App Automated install configuration. Dictionary of name-value pairs", + "properties": { + "configuration": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "param1": "value1", + "param2": "value2" + } + } + } + }, + "InstallTicket": { + "required": [ + "ticket", + "ticketId", + "expiration" + ], + "description": "Power BI Template Apps automated install token", + "properties": { + "ticket": { + "type": "string", + "description": "Install ticket" }, - "createdAt": { + "ticketId": { "type": "string", - "format": "date-time", - "description": "Encryption key creation time" + "format": "uuid", + "description": "The unique ID of a ticket, which can be used to correlate operations that use this ticket with the generate operation through audit logs" }, - "updatedAt": { + "expiration": { "type": "string", "format": "date-time", - "description": "Encryption key last update time" - } - } - }, - "TenantKeyRotationRequest": { - "description": "Rotate encryption key request", - "properties": { - "keyVaultKeyIdentifier": { - "type": "string", - "description": "Uri to the version of the Azure Key Vault key to be used" + "description": "Expiration time of token. In UTC." } } }, - "CapacityPatchRequest": { - "description": "Patch capacity request", + "ArtifactId": { + "description": "The unique ID of an artifact, which is in UUID format for dashboards, reports, and dataflows", + "required": [ + "id" + ], "properties": { - "tenantKeyId": { + "id": { "type": "string", "format": "uuid", - "description": "The id of the encryption key" + "description": "ID" } } }, - "AssignWorkspacesToCapacityRequest": { + "ArtifactStringId": { + "description": "The unique ID of an artifact, which is in string or UUID format for datasets", "required": [ - "capacityMigrationAssignments" + "id" ], - "description": "Request body for assigning workspaces to a premium capacity as tenant admin", "properties": { - "capacityMigrationAssignments": { - "type": "array", - "items": { - "$ref": "#/definitions/CapacityMigrationAssignment" - } + "id": { + "type": "string", + "description": "ID" } } }, - "CapacityMigrationAssignment": { - "required": [ - "workspacesToAssign", - "targetCapacityObjectId" - ], - "description": "Assignment contract for migrating workspaces to shared capacity as tenant admin", + "InformationProtectionArtifactsChangeLabel": { + "description": "A composite of artifact IDs that will be used to update the information protection labels of those artifacts", "properties": { - "workspacesToAssign": { + "dashboards": { "type": "array", - "description": "Workspaces to be migrated to shared capacity", + "description": "List of unique dashboard IDs.", "items": { - "type": "string", - "description": "Workspace id" + "$ref": "#/definitions/ArtifactId" } }, - "targetCapacityObjectId": { - "type": "string", - "description": "Capacity id" - } - } - }, - "UnassignWorkspacesCapacityRequest": { - "required": [ - "workspacesToUnassign" - ], - "description": "Request body for migrating workspaces to shared capacity as tenant admin", - "properties": { - "workspacesToUnassign": { + "reports": { "type": "array", - "description": "Workspaces to be migrated to shared capacity", + "description": "List of unique report IDs.", "items": { - "type": "string", - "description": "Workspace id" + "$ref": "#/definitions/ArtifactId" } - } - } - }, - "ActivityEventResponse": { - "description": "Odata response wrapper for audit activity events list", - "properties": { - "activityEventEntities": { + }, + "datasets": { "type": "array", - "description": "The activity event entities", + "description": "List of unique dataset IDs.", "items": { - "$ref": "#/definitions/Object" + "$ref": "#/definitions/ArtifactStringId" } }, - "continuationUri": { - "type": "string", - "description": "Uri to get the next chunk of the result set" - }, - "continuationToken": { - "type": "string", - "description": "Token to get the next chunk of the result set" + "dataflows": { + "type": "array", + "description": "List of unique dataflow IDs.", + "items": { + "$ref": "#/definitions/ArtifactId" + } } } }, - "Workbooks": { - "description": "Power BI workbook list", + "InformationProtectionChangeLabelResponse": { + "description": "A composite of artifact IDs and label change status", "properties": { - "odata.context": { - "type": "string", - "description": "OData context" + "dashboards": { + "type": "array", + "description": "List of unique dashboard IDs with label change status.", + "items": { + "$ref": "#/definitions/ChangeLabelStatus" + } }, - "value": { + "reports": { "type": "array", - "description": "The workbooks", + "description": "List of unique report IDs with label change status.", "items": { - "$ref": "#/definitions/Workbook" + "$ref": "#/definitions/ChangeLabelStatus" } - } - } - }, - "Workbook": { - "description": "A Power BI workbook", - "properties": { - "name": { - "type": "string", - "description": "The workbook name" }, - "datasetId": { - "type": "string", - "description": "DatasetId for workbooks. Only applies for workbooks that has an associated dataset." - } - } - }, - "Refreshables": { - "description": "Power BI refreshable list", - "properties": { - "odata.context": { - "type": "string", - "description": "OData context" + "dataflows": { + "type": "array", + "description": "List of unique dataflow IDs with label change status.", + "items": { + "$ref": "#/definitions/ChangeLabelStatus" + } }, - "value": { + "datasets": { "type": "array", - "description": "The refreshables", + "description": "List of unique dataset IDs with label change status.", "items": { - "$ref": "#/definitions/Refreshable" + "$ref": "#/definitions/ChangeLabelStatus" } } } }, - "Refreshable": { - "description": "A Power BI refreshable", + "ChangeLabelStatus": { + "description": "Artifact ID with information protection label status", + "required": [ + "id", + "status" + ], "properties": { "id": { "type": "string", - "description": "Object id of refreshable" - }, - "name": { - "type": "string", - "description": "Display name of refreshable" + "description": "The unique ID of an artifact, which is in UUID format for dashboards, reports, and dataflows, and string format for datasets" }, - "kind": { + "status": { "type": "string", - "description": "The refreshable kind", + "description": "Indicates the result of the label change operation", "enum": [ - "Dataset" + "Failed", + "FailedToGetUsageRights", + "InsufficientUsageRights", + "NotFound", + "Succeeded" ], "x-ms-enum": { - "name": "RefreshableKind", + "name": "status", "modelAsExtensible": true, "values": [ { - "value": "Dataset", - "description": "Dataset" + "value": "Failed", + "description": "Label was not changed. Please retry." + }, + { + "value": "FailedToGetUsageRights", + "description": "Failed to set new label. Artifact has a sensitivity label with protection settings. Power BI could not verify if user has sufficient usage rights to change label." + }, + { + "value": "InsufficientUsageRights", + "description": "Failed to set new label. Artifact has a sensitivity label with protection settings that the admin, or both the admin and the delegated user, do not have sufficient usage rights to update label." + }, + { + "value": "NotFound", + "description": "Artifact ID or label was not found." + }, + { + "value": "Succeeded", + "description": "Label was changed on the given artifact." } ] } + } + } + }, + "InformationProtectionChangeLabelDetails": { + "description": "Set label details.", + "required": [ + "artifacts", + "labelId" + ], + "properties": { + "artifacts": { + "description": "A composite of artifact ID lists for each type", + "$ref": "#/definitions/InformationProtectionArtifactsChangeLabel" }, - "startTime": { - "type": "string", - "format": "date-time", - "description": "The start time of the window for which summary data exists" - }, - "endTime": { + "labelId": { "type": "string", - "format": "date-time", - "description": "The end time of the window for which summary data exists" - }, - "refreshCount": { - "type": "integer", - "description": "The number of refreshes within the summary time window" - }, - "refreshFailures": { - "type": "integer", - "description": "The number of refresh failures within the summary time window" - }, - "averageDuration": { - "type": "number", - "description": "The average duration in seconds of a refresh within the summary time window" - }, - "medianDuration": { - "type": "number", - "description": "The median duration in seconds of a refresh within the summary time window" - }, - "refreshesPerDay": { - "type": "integer", - "description": "The number of refreshes per day within the summary time window" + "format": "uuid", + "description": "Label ID (must be in the user’s policy)." }, - "lastRefresh": { - "$ref": "#/definitions/Refresh", - "description": "The last Power BI refresh history entry for the refreshable item" + "delegatedUser": { + "description": "Delegated user details. A delegated user is a user in the admin’s organization on whose behalf the admin sets a label. Although the admin sets the label, the delegated user is marked as the label issuer.", + "$ref": "#/definitions/DelegatedUser" }, - "refreshSchedule": { - "$ref": "#/definitions/RefreshSchedule", - "description": "The refresh schedule for the refreshable item" + "assignmentMethod": { + "type": "string", + "enum": [ + "Standard", + "Priviledged" + ], + "x-ms-enum": { + "name": "assignmentMethod", + "modelAsExtensible": true, + "values": [ + { + "value": "Standard", + "description": "Specifies that the label was set as part of an automatic process." + }, + { + "value": "Priviledged", + "description": "Specifies that the label was set manually." + } + ] + }, + "description": "Specifies whether the assigned label is to be regarded as having been set manually or as the result of automatic labeling. (default value is Standard)." + } + } + }, + "DelegatedUser": { + "description": "Delegated user details. The user must be an existing user in Power BI and Azure AAD, who has signed in to Power BI during the last 3 months.", + "required": [ + "emailAddress" + ], + "properties": { + "emailAddress": { + "description": "Delegated user email address.", + "type": "string" + } + } + }, + "Pipelines": { + "description": "Odata response wrapper for a Power BI deployment pipeline collection.", + "properties": { + "odata.context": { + "type": "string", + "description": "OData context" }, - "configuredBy": { + "value": { "type": "array", - "description": "Refreshable owners", + "description": "The deployment pipelines collection", "items": { - "type": "string" + "$ref": "#/definitions/Pipeline" } - }, - "capacity": { - "$ref": "#/definitions/Capacity", - "description": "The capacity for the refreshable item" - }, - "group": { - "$ref": "#/definitions/Group", - "description": "The associated group for the refreshable item" } } }, - "UpdateRdlDatasourcesRequest": { + "Pipeline": { "required": [ - "updateDetails" + "id" ], - "description": "A paginated report datasources update request.", + "description": "A Power BI deployment pipeline.", "properties": { - "updateDetails": { + "id": { + "type": "string", + "format": "uuid", + "description": "The deployment pipeline ID" + }, + "displayName": { + "type": "string", + "description": "The deployment pipeline display name" + }, + "description": { + "type": "string", + "description": "The deployment pipeline description" + }, + "stages": { "type": "array", - "description": "The paginated report datasources update details.", + "description": "The deployment pipeline stages collection, only returned when $expand stages is specified", "items": { - "$ref": "#/definitions/UpdateRdlDatasourceDetails" + "$ref": "#/definitions/PipelineStage" + } + }, + "users": { + "type": "array", + "description": "The deployment pipeline users collection, only returned when $expand users is specified and only in admin API", + "items": { + "$ref": "#/definitions/PipelineUser" } } } }, - "UpdateRdlDatasourceDetails": { + "PipelineStage": { "required": [ - "connectionDetails", - "datasourceName" + "order" ], - "description": "The new connection details and the target datasource name to be updated.", + "description": "A Power BI deployment pipeline stage.", "properties": { - "connectionDetails": { - "$ref": "#/definitions/RdlDatasourceConnectionDetails", - "description": "The new server and database name." + "order": { + "type": "integer", + "description": "The stage order, starting from zero." }, - "datasourceName": { + "workspaceId": { "type": "string", - "description": "The target datasource name to be updated." + "format": "uuid", + "description": "The assigned workspae ID, only applicable when there is an assigned workspace." + }, + "workspaceName": { + "type": "string", + "description": "The assigned workspae name, only applicable when there is an assigned workspace and the user has access to the workspace." } } }, - "RdlDatasourceConnectionDetails": { - "description": "A paginated report datasource connection details.", + "PipelineStageArtifacts": { + "description": "Supported items from a workspace assigned to a deployment pipeline stage.", "properties": { - "server": { + "datasets": { + "type": "array", + "description": "The datasets collection", + "items": { + "$ref": "#/definitions/PipelineStageDataset" + } + }, + "reports": { + "type": "array", + "description": "The reports collection", + "items": { + "$ref": "#/definitions/PipelineStageReport" + } + }, + "dashboards": { + "type": "array", + "description": "The dashboards collection", + "items": { + "$ref": "#/definitions/PipelineStageDashboard" + } + }, + "dataflows": { + "type": "array", + "description": "The dataflows collection", + "items": { + "$ref": "#/definitions/PipelineStageDataflow" + } + } + } + }, + "PipelineStageArtifactBase": { + "required": [ + "artifactId" + ], + "description": "The deployment pipeline stage artifact metadata.", + "properties": { + "artifactId": { "type": "string", - "description": "The connection server." + "format": "uuid", + "description": "The artifact ID." }, - "database": { + "artifactDisplayName": { "type": "string", - "description": "The connection database." + "description": "The artifact dispaly name." + }, + "sourceArtifactId": { + "type": "string", + "format": "uuid", + "description": "The artifact ID from the workspace of the source stage, which will update the current artifact upon deployment. Applicable only when the user has at least contributor access to the source stage workspace." + }, + "targetArtifactId": { + "type": "string", + "format": "uuid", + "description": "The artifact ID from the workspace of the target stage, which will be updated by the current artifact upon deployment. Applicable only when the user has at least contributor access to the target stage workspace." + }, + "lastDeploymentTime ": { + "type": "string", + "format": "date-time", + "description": "The artifact's last deployment time." } } }, - "DataflowTransactions": { - "description": "A dataflow transaction odata list wrapper", + "PipelineStageDataflow": { + "description": "The deployment pipeline dataflow metadata.", + "allOf": [ { "$ref": "#/definitions/PipelineStageArtifactBase" } ] + }, + "PipelineStageDataset": { + "description": "The deployment pipeline dataset metadata.", + "allOf": [ { "$ref": "#/definitions/PipelineStageArtifactBase" } ] + }, + "PipelineStageReport": { + "description": "The deployment pipeline report metadata.", + "allOf": [ { "$ref": "#/definitions/PipelineStageArtifactBase" } ] + }, + "PipelineStageDashboard": { + "description": "The deployment pipeline dashboard metadata.", + "allOf": [ { "$ref": "#/definitions/PipelineStageArtifactBase" } ] + }, + "PipelineOperations": { + "description": "Odata response wrapper for a Power BI deployment pipeline operation collection", "properties": { "odata.context": { "type": "string", @@ -17902,361 +20756,507 @@ }, "value": { "type": "array", - "description": "The dataflow transactions", + "description": "The deployment pipeline operations collection", "items": { - "$ref": "#/definitions/DataflowTransaction" + "$ref": "#/definitions/PipelineOperation" } } } }, - "DataflowTransaction": { + "PipelineOperation": { "required": [ - "id" + "id", + "status", + "lastUpdatedTime" ], - "description": "A Power BI dataflow transaction", + "description": "A Power BI deployment pipeline operation.", "properties": { "id": { "type": "string", - "description": "The transaction id" + "format": "uuid", + "description": "The operation ID." }, - "refreshType": { + "type": { "type": "string", - "description": "The type of refresh transaction" + "description": "The operation type.", + "enum": [ + "Deploy" + ], + "x-ms-enum": { + "name": "PipelineOperationType", + "modelAsExtensible": true, + "values": [ + { + "value": "Deploy", + "description": "Deploy content between stages" + } + ] + } }, - "startTime": { + "status": { "type": "string", - "description": "Start time of the transaction" + "description": "The pipeline operation status.", + "enum": [ + "NotStarted", + "Executing", + "Succeeded", + "Failed" + ], + "x-ms-enum": { + "name": "PipelineOperationStatus", + "modelAsExtensible": true, + "values": [ + { + "value": "NotStarted", + "description": "Operation not started" + }, + { + "value": "Executing", + "description": "Operation executing" + }, + { + "value": "Succeeded", + "description": "Operation succeeded" + }, + { + "value": "Failed", + "description": "Operation failed" + } + ] + } }, - "endTime": { + "lastUpdatedTime": { "type": "string", - "description": "End time of the transaction" + "format": "date-time", + "description": "The last time the operation was updated." }, - "status": { + "executionStartTime": { "type": "string", - "description": "Status of the transaction" + "format": "date-time", + "description": "The time the operation execution started." + }, + "executionEndTime": { + "type": "string", + "format": "date-time", + "description": "The time the operation execution ended." + }, + "sourceStageOrder": { + "type": "integer", + "description": "The source stage order. Development (0), Test (1), Production (2)." + }, + "targetStageOrder": { + "type": "integer", + "description": "The target stage order. Development (0), Test (1), Production (2)." + }, + "executionPlan": { + "description": "The deployment execution plan. Only applicable when getting a single operation.", + "$ref": "#/definitions/DeploymentExecutionPlan" } } }, - "DataflowTransactionStatus": { - "description": "Status of dataflow refresh transaction", + "DeploymentExecutionPlan": { + "description": "The deployment execution plan", "properties": { - "transactionId": { - "description": "Transaction id", - "type": "string" - }, - "status": { - "description": "Status of transaction", - "type": "string", - "enum": [ - "invalid", - "successfullyMarked", - "alreadyConcluded", - "notFound" - ] + "steps": { + "type": "array", + "description": "The execution plan steps collection", + "items": { + "$ref": "#/definitions/DeploymentExecutionStep" + } } } }, - "DataflowUpdateRequestMessage": { - "description": "Request payload for updating dataflow information", + "DeploymentExecutionStep": { + "required": [ + "index", + "type", + "status", + "lastUpdatedTime" + ], + "description": "The deployment execution step", "properties": { - "name": { - "description": "New name of the dataflow", - "type": "string" - }, - "description": { - "description": "New description for the dataflow", - "type": "string" + "index": { + "type": "integer", + "description": "The step index" }, - "allowNativeQueries": { - "description": "Allow native queries", - "type": "boolean" + "type": { + "type": "string", + "description": "The deployment step type", + "enum": [ + "DatasetDeployment", + "ReportDeployment", + "DashboardDeployment", + "DataflowDeployment" + ], + "x-ms-enum": { + "name": "DeploymentStepType", + "modelAsExtensible": true, + "values": [ + { + "value": "DatasetDeployment", + "description": "A step for deploying a single dataset" + }, + { + "value": "ReportDeployment", + "description": "A step for deploying a single report" + }, + { + "value": "DashboardDeployment", + "description": "A step for deploying a single dashboard" + }, + { + "value": "DataflowDeployment", + "description": "A step for deploying a single dataflow" + } + ] + } }, - "computeEngineBehavior": { - "description": "Compute Engine Behavior", + "status": { "type": "string", + "description": "The status of the pipeline operation.", "enum": [ - "computeOptimized", - "computeOn", - "computeDisabled" - ] - } - } - }, - "CreateInstallTicketRequest": { - "description": "Power BI Create Install Ticket Request", - "properties": { - "installDetails": { - "type": "array", - "description": "List of install details", - "items": { - "$ref": "#/definitions/TemplateAppInstallDetails" + "NotStarted", + "Executing", + "Succeeded", + "Failed" + ], + "x-ms-enum": { + "name": "PipelineOperationStatus", + "modelAsExtensible": true, + "values": [ + { + "value": "NotStarted", + "description": "Operation didn't start" + }, + { + "value": "Executing", + "description": "Operation executing" + }, + { + "value": "Succeeded", + "description": "Operation succeeded" + }, + { + "value": "Failed", + "description": "Operation failed" + } + ] } + }, + "sourceAndTarget": { + "description": "The source and target items of the step", + "$ref": "#/definitions/DeploymentSourceAndTarget" + }, + "error": { + "description": "Error details of the step's failure", + "$ref": "#/definitions/DeploymentError" } } }, - "TemplateAppInstallDetails": { + "DeploymentSourceAndTarget": { "required": [ - "appId", - "packageKey", - "ownerTenantId" + "source" ], - "description": "Power BI Template App Install Details", + "description": "Source and target items.", "properties": { - "appId": { + "source": { "type": "string", "format": "uuid", - "description": "Unique application Id." + "description": "The ID of the artifact being deployed from the source stage." }, - "packageKey": { - "type": "string", - "description": "Application version secure key" - }, - "ownerTenantId": { + "target": { "type": "string", "format": "uuid", - "description": "Application owner's tenant object Id" - }, - "config": { - "$ref": "#/definitions/TemplateAppConfigurationRequest", - "description": "Automated install configuration." - } - } - }, - "TemplateAppConfigurationRequest": { - "description": "Power BI Template App Automated install configuration. Dictionary of name-value pairs", - "properties": { - "configuration": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "example": { - "param1": "value1", - "param2": "value2" - } + "description": "The ID of the artifact being overwritten on the target stage. Only applicable when overwriting an artifact." } } }, - "InstallTicket": { - "required": [ - "ticket", - "ticketId", - "expiration" - ], - "description": "Power BI Template Apps automated install token", + "DeploymentError": { + "description": "The deployment step error details", "properties": { - "ticket": { - "type": "string", - "description": "Install ticket" - }, - "ticketId": { + "errorCode": { "type": "string", - "format": "uuid", - "description": "Unique ticket Id. Can be used to correlate operations that use this ticket with the generate operation through audit logs." + "description": "The error code" }, - "expiration": { + "errorDetails": { "type": "string", - "format": "date-time", - "description": "Expiration time of token. In UTC." + "description": "Additional error details" } } - }, - "ArtifactId": { - "description": "Unique artifact ID: uuid format for dashboards/reports/dataflows.", + }, + "DeployRequestBase": { "required": [ - "id" + "sourceStageOrder" ], + "description": "Base request to deploy content from a deployment pipeline stage.", "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID" + "sourceStageOrder": { + "type": "integer", + "description": "The order of the pipeline stages that the content should be deployed from." + }, + "isBackwardDeployment": { + "type": "boolean", + "description": "Whether the deployment should be done into the previous stage, if not provided treated as false." + }, + "newWorkspace": { + "description": "Required for creating a new workspace when deploying into a stage which has no assigned workspaces. If not provided when required, deployment will fail.", + "$ref": "#/definitions/PipelineNewWorkspaceRequest" + }, + "updateAppSettings": { + "description": "Update org app in the target workspace settings.", + "$ref": "#/definitions/PipelineUpdateAppSettings" + }, + "options": { + "description": "Options to control the behavior of the entire deployment.", + "$ref": "#/definitions/DeploymentOptions" } } }, - "ArtifactStringId": { - "description": "Unique artifact ID: string format (can be uuid) for datasets.", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string", - "description": "ID" - } - } + "DeployAllRequest": { + "description": "Request to deploy all supported items from a deployment pipeline stage", + "allOf": [ { "$ref": "#/definitions/DeployRequestBase" } ] }, - "InformationProtectionArtifactsChangeLabel": { - "description": "Composite of artifact IDs that will be used to update the information protection labels of those artifacts.", + "SelectiveDeployRequest": { + "description": "Request to selectively deploy items from a deployment pipeline stage", + "allOf": [ { "$ref": "#/definitions/DeployRequestBase" } ], "properties": { - "dashboards": { + "datasets": { "type": "array", - "description": "List of unique dashboard IDs.", + "description": "A list of datasets to be deployed", "items": { - "$ref": "#/definitions/ArtifactId" + "$ref": "#/definitions/DeployArtifactRequest" } }, "reports": { "type": "array", - "description": "List of unique report IDs.", + "description": "A list of reports to be deployed", "items": { - "$ref": "#/definitions/ArtifactId" + "$ref": "#/definitions/DeployArtifactRequest" } }, - "datasets": { + "dashboards": { "type": "array", - "description": "List of unique dataset IDs.", + "description": "A list of dashboards to be deployed", "items": { - "$ref": "#/definitions/ArtifactStringId" + "$ref": "#/definitions/DeployArtifactRequest" } }, "dataflows": { "type": "array", - "description": "List of unique dataflow IDs.", + "description": "A list of dataflows to be deployed", "items": { - "$ref": "#/definitions/ArtifactId" + "$ref": "#/definitions/DeployArtifactRequest" } } } }, - "InformationProtectionChangeLabelResponse":{ - "description": "Composite of artifact IDs and label change status.", + "PipelineNewWorkspaceRequest": { + "description": "Configuration for creating a new workspace when deploying into a stage which has no assigned workspaces.", "properties": { - "dashboards": { - "type": "array", - "description": "List of unique dashboard IDs with label change status.", - "items": { - "$ref": "#/definitions/ChangeLabelStatus" - } + "name": { + "type": "string", + "description": "The name of the new workspace." }, - "reports": { - "type": "array", - "description": "List of unique report IDs with label change status.", - "items": { - "$ref": "#/definitions/ChangeLabelStatus" - } + "capacityId": { + "type": "string", + "format": "uuid", + "description": "The ID of the capacity that the new workspace will be assigned to. When unspecified, if you have permissions for the source stage workspace capacity, this capacity will be used. Otherwise, a capacity that you have permissions for, will be selected." + } + } + }, + "PipelineUpdateAppSettings": { + "description": "Configuration update org app after deployment", + "properties": { + "updateAppInTargetWorkspace": { + "type": "boolean", + "description": "Whether to update the app in the target workspace" + } + } + }, + "DeploymentOptions": { + "description": "Options to control the behaviour of the deployment. can be specified either for the entire deployment or for a specific artifact. if both are specified, the artifact value is used.", + "properties": { + "allowCreateArtifact": { + "type": "boolean", + "description": " Specifies whether creating a new artifact on the target stage workspace is allowed. If required but not allowed, deployment will fail." }, - "dataflows": { - "type": "array", - "description": "List of unique dataflow IDs with label change status.", - "items": { - "$ref": "#/definitions/ChangeLabelStatus" - } + "allowOverwriteArtifact": { + "type": "boolean", + "description": "Specifies whether overwriting an artifact on the target stage workspace is allowed. If required but not allowed, deployment will fail." }, - "datasets": { - "type": "array", - "description": "List of unique dataset IDs with label change status.", - "items": { - "$ref": "#/definitions/ChangeLabelStatus" - } + "allowSkipTilesWithMissingPrerequisites": { + "type": "boolean", + "description": "Specifies whether skipping tiles that are missing their model or report in target stage workspace is allowed. If required but not allowed, deployment will fail." + }, + "allowPurgeData": { + "type": "boolean", + "description": "Specify whether deleting all data from the target artifact is allowed in case of a schema mismatch. If required but not allowed, deployment will fail." + }, + "allowTakeOver": { + "type": "boolean", + "description": "Specify whether taking ownership of the target artifact is allowed for paginated report. If required but not allowed, deployment will fail." + }, + "allowOverwriteTargetArtifactLabel": { + "type": "boolean", + "description": "Specify whether changing the target artifact label is allowed. The label is changed when the source is protected but the target is not. If required but not allowed, deployment will fail." } } }, - "ChangeLabelStatus" :{ - "description": "Artifact ID with information protection label status", + "DeployArtifactRequest": { "required": [ - "id", - "status" + "sourceId" ], + "description": "The artifact to be deployed", "properties": { - "id": { + "sourceId": { "type": "string", - "description": "Unique artifact Id, uuid format for dashboard/report/dataflow, and string format for dataset." + "format": "uuid", + "description": "The artifact ID" }, - "status": { + "options": { + "description": "Options to control the behavior of the deployment of a specific artifact", + "$ref": "#/definitions/DeploymentOptions" + } + } + }, + "PipelineUsers": { + "description": "Odata response wrapper for a Power BI deployment pipeline users collection.", + "properties": { + "odata.context": { "type": "string", - "description": "Indicates the result of the label change operation", - "enum": [ - "Failed", - "FailedToGetUsageRights", - "InsufficientUsageRights", - "NotFound", - "Succeeded" - ], - "x-ms-enum": { - "name": "status", - "modelAsExtensible": true, - "values": [ - { - "value": "Failed", - "description": "Label was not changed. Please retry." - }, - { - "value": "FailedToGetUsageRights", - "description": "Failed to set new label. Artifact has a sensitivity label with protection settings. Power BI could not verify if user has sufficient usage rights to change label." - }, - { - "value": "InsufficientUsageRights", - "description": "Failed to set new label. Artifact has a sensitivity label with protection settings that the admin, or both the admin and the delegated user, do not have sufficient usage rights to update label." - }, - { - "value": "NotFound", - "description": "Artifact ID or label was not found." - }, - { - "value": "Succeeded", - "description": "Label was changed on the given artifact." - } - ] + "description": "OData context" + }, + "value": { + "type": "array", + "description": "The deployment pipeline users collection", + "items": { + "$ref": "#/definitions/PipelineUser" } } } }, - "InformationProtectionChangeLabelDetails" :{ - "description": "Set label details.", + "PipelineUser": { "required": [ - "artifacts", - "labelId" + "identifier", + "principalType" ], + "description": "A Power BI user access right entry for a deployment pipeline.", "properties": { - "artifacts": { - "description": "Composite of artifact ID lists per type.", - "$ref": "#/definitions/InformationProtectionArtifactsChangeLabel" - }, - "labelId": { - "type": "string", - "format": "uuid", - "description": "Label ID (must be in the user’s policy)." - }, - "delegatedUser": { - "description": "Delegated user details. A delegated user is a user in the admin’s organization on whose behalf the admin sets a label. Although the admin sets the label, the delegated user is marked as the label issuer.", - "$ref": "#/definitions/DelegatedUser" - }, - "assignmentMethod": { + "accessRight": { "type": "string", + "description": "**Required** - Access rights a user has for the deployment pipeline.", "enum": [ - "Standard", - "Priviledged" + "Admin" ], "x-ms-enum": { - "name": "assignmentMethod", + "name": "PipelineUserAccessRight", "modelAsExtensible": true, "values": [ { - "value": "Standard", - "description": "Specifies that the label was set as part of an automatic process." - }, - { - "value": "Priviledged", - "description": "Specifies that the label was set manually." + "value": "Admin", + "description": "Grants administrator rights to a deployment pipeine" } ] - }, - "description": "Specifies whether the assigned label is to be regarded as having been set manually or as the result of automatic labeling. (default value is Standard)." + } + }, + "identifier": { + "type": "string", + "description": "For Principal type 'User' provide UPN , otherwise provide [Object ID](/power-bi/developer/embedded/embedded-troubleshoot#what-is-the-difference-between-application-object-id-and-principal-object-id) of the principal" + }, + "principalType": { + "$ref": "#/definitions/PrincipalType" } } }, - "DelegatedUser" :{ - "description": "Delegated user details. The user must be an existing user in Power BI and Azure AAD, who has signed in to Power BI during the last 3 months.", + "DatasetExecuteQueriesRequest": { + "type": "object", "required": [ - "emailAddress" + "queries" ], "properties": { - "emailAddress": { - "description": "Delegated user email address.", - "type": "string" + "queries": { + "type": "array", + "description": "A list of queries to be executed.", + "items": { + "$ref": "#/definitions/DatasetExecuteQueriesQuery" + } + }, + "serializerSettings": { + "description": "The serialization settings for the results.", + "$ref": "#/definitions/DatasetExecuteQueriesSerializationSettings" } - } + }, + "description": "Request to execute queries against a dataset." + }, + "DatasetExecuteQueriesQuery": { + "type": "object", + "required": [ + "query" + ], + "properties": { + "query": { + "type": "string", + "description": "The DAX query to be executed." + } + }, + "description": "A dataset query." + }, + "DatasetExecuteQueriesSerializationSettings": { + "type": "object", + "properties": { + "includeNulls": { + "type": "boolean", + "description": "1 indicates that null (blank) values should be included in the result. 0 indicates they should be omitted. 0 is the default in absence of the settings." + } + }, + "description": "The serialization settings for the dataset query results." + }, + "DatasetExecuteQueriesResponse": { + "type": "object", + "properties": { + "results": { + "type": "array", + "description": "A list of results, one per input query.", + "items": { + "$ref": "#/definitions/DatasetExecuteQueriesQueryResult" + } + } + }, + "description": "Response of a data set execute queries request." + }, + "DatasetExecuteQueriesQueryResult": { + "type": "object", + "properties": { + "tables": { + "type": "array", + "description": "A list of tables data for a query.", + "items": { + "$ref": "#/definitions/DatasetExecuteQueriesTableResult" + } + } + }, + "description": "Result of a single data set query." + }, + "DatasetExecuteQueriesTableResult": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "A list of rows.", + "items": { + "$ref": "#/definitions/DatasetExecuteQueriesRowResult" + } + } + }, + "description": "A table of data." + }, + "DatasetExecuteQueriesRowResult": { + "type": "object", + "example": { + "Country": "United States", + "Sales": 100.5 + }, + "description": "A set of key value pairs representing the column name and value. The column name is the key of the pair." } }, "parameters": {