Forum Discussion

jaryszek's avatar
jaryszek
Super User
5 months ago
Solved

Does getDefinition support DirectLake semantic models?

Hi, I'm using the Fabric REST API to retrieve a semantic model definition: POST /v1/workspaces/{workspaceId}/semanticModels/{semanticModelId}/getDefinition This works for Import models, but I'm un...
  • v-tejrama's avatar
    v-tejrama
    3 months ago

    Hi  jaryszek ,

     

    The current API behavior is as expected. The getDefinition endpoint may not consistently return a definition for DirectLake semantic models created directly on a Lakehouse, since the model is not always stored as a fully serialized definition. Much of the metadata is dynamically derived from the underlying Delta tables, which can result in the API returning null even when the request completes successfully. This does not indicate a failure.

    Currently, there is no REST API that guarantees a non-null definition for DirectLake models. If you need a reusable model definition for automation or copy scenarios, it is more reliable to use models deployed through XMLA or similar methods where the definition is fully persisted.

    For copy or deployment scenarios involving DirectLake, it is recommended to use the XMLA endpoint or external tools to script or recreate the model, rather than relying on getDefinition. If this approach does not fit your requirements or you need this capability via REST, please consider submitting a Microsoft support ticket for further assistance.

    To raise a support ticket for Fabric and Power BI, kindly follow the steps outlined in the following guide: How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn.

    Thank you.