---
title: "Discussion on \"Using FabricRestClient To Make Fabric REST API Calls\" | Hashnode"
description: "Discussion on \"Using FabricRestClient To Make Fabric REST API Calls\". Using FabricRestClient in sempy"
url: "https://hashnode.com/posts/using-fabricrestclient-to-make-fabric-rest-api-calls/6583586a90273955eb3ed8ed"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Using FabricRestClient To Make Fabric REST API Calls](https://fabric.guru/using-fabricrestclient-to-make-fabric-rest-api-calls?utm_source=hashnode&utm_medium=feed)

Using FabricRestClient in sempy

Dec 20, 2023 · 4 min read · fabric.guru  
Updated Mar 23, 2025  
Read the article

-   [#microsoft-fabric](https://hashnode.com/tag/microsoft-fabric)
-   [#semantic-link](https://hashnode.com/tag/semantic-link)
-   [#sempy](https://hashnode.com/tag/sempy)
-   [#rest-api](https://hashnode.com/tag/rest-api)

## Written by

[Sandeep Pawar](https://hashnode.com/@PawarBI)

@PawarBI

  
[View profile](https://hashnode.com/@PawarBI)

Building Data Analytics and Data Science solutions using Microsoft Fabric | Principal PM, Microsoft Fabric CAT

Principal Program Manager, Microsoft Fabric CAT helping users and organizations build scalable, insightful, secure solutions. Blogs, opinions are my own and do not represent my employer.

## Responses 2

Markdown supported · ⌘↵ to post

[HARSH RAWAT](https://hashnode.com/@harshrawat)

[Feb 28, 2025](https://hashnode.com/posts/using-fabricrestclient-to-make-fabric-rest-api-calls/6583586a90273955eb3ed8ed/comment/67c13da7b24a407eac4e1694)

Nice post. It really helped. I have a query, I tried using your code for lakehouse creation and replaced it with datapipeline creation but when I am adding some activities to the payload it is still creation an empty datapipeline inside workspace. Can you please share you thoughts and guide with the code.

[Jean-Pierre Riehl](https://hashnode.com/@djeepy1)

[Jan 7, 2025](https://hashnode.com/posts/using-fabricrestclient-to-make-fabric-rest-api-calls/6583586a90273955eb3ed8ed/comment/677d5ac6f63941da1affb64b)

Hi [Sandeep Pawar](https://hashnode.com/@PawarBI) I notice there is an experimental _PowerBIRestClient_ to call legacy Power BI API. <>

[Jean-Pierre Riehl](https://hashnode.com/@djeepy1)

[Jan 7, 2025](https://hashnode.com/posts/using-fabricrestclient-to-make-fabric-rest-api-calls/6583586a90273955eb3ed8ed/comment/677d5ac6f63941da1affb64b#reply-677d5adc717cdc4b657d79d4)

cannot add link to documentation as I'm a new user

[Swapnil Saxena](https://hashnode.com/@swapnil646)

[Jan 20, 2024](https://hashnode.com/posts/using-fabricrestclient-to-make-fabric-rest-api-calls/6583586a90273955eb3ed8ed/comment/65abdfa841e469a0bac7b012)

Awesome post.

Can I ask how do the POST requests work with FabricRestClient? I'm trying to invoke Job scheduler APIs to invoke an item job instance as covered in below REST API doc.

"Job Scheduler - Run On Demand Item Job" (Can't post links as I'm restricted currently)

I tried this: response = client.post(f"v1/workspaces/{workspaceId}/items/{itemId}/jobs/instances?jobType={jobType}")

But I'm getting this exception FabricHTTPException: 400 Bad Request for url: . . . "moreDetails":\[{"errorCode":"InvalidParameter","message":"'runOnDemandItemJobRequest' is a required parameter"}\],"message":"The request has an invalid input"}

I understand that as per the doc, there's a request body that must go along too but can't figure out where to put that in the request method. Would appreciate any help on this. Thanks!

[Sandeep Pawar](https://hashnode.com/@PawarBI)

[Jan 21, 2024](https://hashnode.com/posts/using-fabricrestclient-to-make-fabric-rest-api-calls/6583586a90273955eb3ed8ed/comment/65abdfa841e469a0bac7b012#reply-65ad957e2fd38c1a004deda5)

[Swapnil Saxena](https://hashnode.com/@swapnil646) please check the updated blog. I have added an example.

[Swapnil Saxena](https://hashnode.com/@swapnil646)

[Jan 22, 2024](https://hashnode.com/posts/using-fabricrestclient-to-make-fabric-rest-api-calls/6583586a90273955eb3ed8ed/comment/65abdfa841e469a0bac7b012#reply-65ae07cd508959e50fcc00ab)

[Sandeep Pawar](https://hashnode.com/@PawarBI)

Thanks a lot! I could replicate your example to see the POST work.

However, for some reason, I'm unable to get the On demand job scheduler to work. It complains that the job type is invalid. I used the jobType=DefaultJob for a Data pipeline item.

[learn.microsoft.com/en-us/rest/api/fabric/core/jo…](https://learn.microsoft.com/en-us/rest/api/fabric/core/job-scheduler/run-on-demand-item-job?tabs=HTTP)
