Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ddelapasse
Frequent Visitor

Issue trying to get Semantic Model via api

I'm making a post to {baseUrl}/workspaces/{workspaceId}/semanticModels/{semanticModelId}/getDefinition and I get a 202 with a Location url in the response header.   Then, I am doing a get to that Location url which looks like: https://wabi-us-east2-b-primary-redirect.analysis.windows.net/v1/operations/{guid}.  That returns 200.

I get only this json though: {"status":"Succeeded","createdTimeUtc":"2024-11-07T15:41:21.2885946","lastUpdatedTimeUtc":"2024-11-07T15:41:21.8198463","percentComplete":100,"error":null}

How do I get the actual semantic model json?  Is there any documentation of the handling of the 202?  Maybe something else is required?  

1 ACCEPTED SOLUTION
AmosHersch
Microsoft Employee
Microsoft Employee

What you are describing in the behavior of long running operations in Microsoft Fabric APIs.

For APIs which return a result, like the "getDefinition", once the "Get Operation State" returns 200 with status:Succeeded, it will contain another URL for fetching the result. It should look like this in your case:
 https://wabi-us-east2-b-primary-redirect.analysis.windows.net/v1/operations/{guid}/result

 

 

See this documentation for more details: Long running operations - Microsoft Fabric REST APIs | Microsoft Learn

View solution in original post

2 REPLIES 2
AmosHersch
Microsoft Employee
Microsoft Employee

What you are describing in the behavior of long running operations in Microsoft Fabric APIs.

For APIs which return a result, like the "getDefinition", once the "Get Operation State" returns 200 with status:Succeeded, it will contain another URL for fetching the result. It should look like this in your case:
 https://wabi-us-east2-b-primary-redirect.analysis.windows.net/v1/operations/{guid}/result

 

 

See this documentation for more details: Long running operations - Microsoft Fabric REST APIs | Microsoft Learn

lbendlin
Super User
Super User

Seems to be an inofficial endpoint?  The regular API still uses the "dataset" term.

 

Datasets - Get Dataset In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.