.NET Framework/Embed for your organization/UserOwnsData/Controllers/EmbedInfoController.cs
/// <summary>
/// Returns reports names and their corresponding Ids to the client
/// </summary>
/// <param name="workspaceId">Workspace Id to get the list of reports</param>
/// <returns>JSON containing list of Power BI reports</returns>
Returns reports names and their corresponding Ids to the client
Returns reports names and their corresponding Ids to the client
[Authorize]
		[HttpPost]
		[Route("/embedinfo/getreport")]
		public async Task<JsonResult> GetReport(string workspaceId)
		{
			try
			{
				if (string.IsNullOrWhiteSpace(workspaceId))
				{
					throw new ArgumentNullException(nameof(workspaceId));
				}
				else
				{
					return this.Json(await PowerBIService.GetReportsAsync(workspaceId));
				}
			}
			catch (HttpRequestException ex)
			{
				Console.Error.WriteLine(ex);
				throw;
			}
			catch (FormatException ex)
			{
				Console.Error.WriteLine(ex);
				throw;
			}
		}
[ Authorize ] [ HttpPost ] [ Route ( " " ) ] public async Task < JsonResult > GetReport ( string workspaceId ) { try { if ( string . IsNullOrWhiteSpace ( workspaceId ) ) { throw new ArgumentNullException ( nameof ( workspaceId ) ) ; } else { return this . Json ( await PowerBIService . GetReportsAsync ( workspaceId ) ) ; } } catch ( HttpRequestException ex ) { Console . Error . WriteLine ( ex ) ; throw ; } catch ( FormatException ex ) { Console . Error . WriteLine ( ex ) ; throw ; } }
Returns reports names and their corresponding Ids to the client
Returns reports names and their corresponding Ids to the client
// Retrieving reports in a workspace
JSON containing list of Power BI reports
JSON containing list of Power BI reports
workspaceId
string
Workspace Id to get the list of reports
Workspace Id to get the list of reports