# TIL: FabricRestClient Supports Long Running Operations

I want to thank [Michael Kovalsky](https://www.elegantbi.com/) for pointing out that `FabricRestClient` in Semantic Link supports (since v 0.7.5) Long Running Operation (LRO).

<div data-node-type="callout">
<div data-node-type="callout-emoji">💡</div>
<div data-node-type="callout-text">LRO support allows the client to wait for the request to process without being blocked. Without LRO support, you will get a 202 response code saying the request is being processed. You need to submit another request based on the url returned to get the result. With LRO support, FabricRestClient will wait 20s and give you the result back.</div>
</div>

For any Fabric APIs that support LRO, you just need to pass `lro_wait=True`

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1722025688230/cbd1f4df-a79a-4f21-aaf7-361f32514650.png align="center")

**Example:**

Below API returns Fabric notebook definition

```python
%pip install semantic-link

import sempy.fabric as fabric

client = fabric.FabricRestClient()

response = client.post(f"v1/workspaces/<ws>/notebooks/<nb>/getDefinition", lro_wait = True)

response
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1722026954835/ca49f617-916b-4dbb-a339-d2cb4d31cd14.png align="center")

If you would like to learn more about Semantic Link and Semantic Link Labs, watch this excellent session by Michael:

%[https://www.youtube.com/watch?v=gGIxMrTVyyI] 

**Notes:**

* TIL : Today I Learned
    
* Search [this](https://learn.microsoft.com/pdf?url=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Frest%2Fapi%2Ffabric%2Ftoc.json) for all the Fabric APIs
