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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Fabric API Table load required parameters

Hello,

 

I want to load a table in Fabric following this documentation: Lakehouse management API - Microsoft Fabric | Microsoft Learn .

It uses the following API call:

 

POST https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/lakehouses/{lakehouseId}/tables/demo/load 
{ 
    "relativePath": "Files/demo.csv", 
    "pathType": "File", 
    "mode": "overwrite", 
    "formatOptions": 
    { 
        "header": true, 
        "delimiter": ",", 
        "format": "CSV" 
    } 
}

 

However for me this returns : "An invalid request has been received: ' 'loadTableRequest' is a required parameter.'."

 

How should I add this parameter to the request?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

First, note that:

 

To use the Fabric REST API, you first need to get a Microsoft Entra token for the Fabric service. Then use the token in the authorization header of the API call.

 

You can click on the official document below to learn:

Fabric API quickstart - Microsoft Fabric REST APIs | Microsoft Learn

 

Second, this API is asynchronous, so it requires three steps:

 

  • Use the OneLake API to upload files and folders to the "Files" section of your lakehouse.
  • Submit the payload to the Table API request.
  • Track the status of the operation until it completes.

 

Finally, run the following command in the notebook corresponding to your lakehouse, replacing "YOUR_ACCESS_TOKEN", {workspaceId}, {lakehouseId}, and the products table name with the appropriate values.

import requests

url = https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/lakehouses/{lakehouseId} /tables/products/load
headers = {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Content-Type": "application/json"
}
data = {
   
       "relativePath": "Files/products.csv",
       "pathType": "File",
       "mode": "overwrite",
       "formatOptions": {
           "header": True,
           "delimiter": ",",
           "format": "CSV"
       }
   
}

response = requests.post(url, headers=headers, json=data)

print(response.status_code)
print(response.json())

 

I ran it successfully.

vhuijieymsft_0-1721627462367.png

 

If you have any other questions please feel free to contact me.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

First, note that:

 

To use the Fabric REST API, you first need to get a Microsoft Entra token for the Fabric service. Then use the token in the authorization header of the API call.

 

You can click on the official document below to learn:

Fabric API quickstart - Microsoft Fabric REST APIs | Microsoft Learn

 

Second, this API is asynchronous, so it requires three steps:

 

  • Use the OneLake API to upload files and folders to the "Files" section of your lakehouse.
  • Submit the payload to the Table API request.
  • Track the status of the operation until it completes.

 

Finally, run the following command in the notebook corresponding to your lakehouse, replacing "YOUR_ACCESS_TOKEN", {workspaceId}, {lakehouseId}, and the products table name with the appropriate values.

import requests

url = https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/lakehouses/{lakehouseId} /tables/products/load
headers = {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Content-Type": "application/json"
}
data = {
   
       "relativePath": "Files/products.csv",
       "pathType": "File",
       "mode": "overwrite",
       "formatOptions": {
           "header": True,
           "delimiter": ",",
           "format": "CSV"
       }
   
}

response = requests.post(url, headers=headers, json=data)

print(response.status_code)
print(response.json())

 

I ran it successfully.

vhuijieymsft_0-1721627462367.png

 

If you have any other questions please feel free to contact me.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

Anonymous
Not applicable

Thank you, the following was actually missing in my request

"Content-Type": "application/json"

 

btw, is there any other documentation about this api endpoint? What if I want to go beyond this example and load multiple parquet files from a folder?

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June FBC25 Carousel

Fabric Monthly Update - June 2025

Check out the June 2025 Fabric update to learn about new features.