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
Hi Matthew_Kursar ,
Thank you for reaching out to the Microsoft Community Forum.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Regards,
Dinesh
I've updated the original question with more details 🙂
What I'm hoping to get from the API call is a response that includes the 'relationships' key similar to this example from the REST API GetScanResult documentation
"datasets": [
{
"id": "e7e8a355-e77b-4418-a7b8-ae5972fdaa03",
"name": "ExportB",
"tables": [
{...}
],
"relationships": [], # this field here
...insert rest of responseHowever, my API responses have most of the data, just not this relationships key
- v-dineshya1 year ago
Community Support
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
- Matthew_Kursar1 year agoFrequent Visitor
Ah, I see. Well that's a shame that the API doesn't support relationships. I hope one day the API is expanded to include it