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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. 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
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.