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