Forum Discussion
REST API PostWorkspaceInfo Relationships
- 1 year ago
Hi Matthew_Kursar ,
1. The API supports several metadata flags including datasetSchema, datasetExpressions, lineage, and datasourceDetails.It does not explicitly guarantee that the relationships field will be populated even when you set datasetSchema=True .
2. The sample response in the documentation includes a relationships key, but this appears to be illustrative rather than guaranteed output. That metadata scanning must be fully enabled for schema and expression data to be returned.
Note: The relationships field is not reliably returned by the PostWorkspaceInfo API, even with all metadata flags enabled.
You may need to extract relationship data manually from .pbip project files or use XMLA endpoints with tools like SSMS or PowerShell for deeper model, especially if you are looking for governance and performance validation.
Please refer Microsoft official document.
Admin - WorkspaceInfo PostWorkspaceInfo - REST API (Power BI Power BI REST APIs) | Microsoft Learn
If my response has resolved your query, please mark it as the "Accepted Solution" to assist others. Additionally, a "Kudos" would be appreciated if you found my response helpful.
Thank you
Just to clarify, do you mean having the Enhanced Metadata preview feature enabled for all the reports I want to see the relationship data of?
I just tried re-publishing a report with enhanced metadata enabled and unfortunately there wasn't a change in the API response.
The tenant setting https://learn.microsoft.com/en-us/fabric/admin/metadata-scanning-setup#enable-tenant-settings-for-metadata-scanning that enables some API flags
POST https://api.powerbi.com/v1.0/myorg/admin/workspaces/getInfo?lineage={lineage}&datasourceDetails={datasourceDetails}&datasetSchema={datasetSchema}&datasetExpressions={datasetExpressions}&getArtifactUsers={getArtifactUsers}
- Matthew_Kursar1 year agoFrequent Visitor
Yes, both detailed metadata and dax/mashup expressions are enabled in the tenant settings.