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
DevinL
Helper I
Helper I

Trouble with Request Body in Copy Data data flow

I'm connecting to a REST API through a POST request and trying to pass some parameters (filters) in the body:

 

 

{
	"size": 100,
	"page": 1,
	"search": {
"date_limits": [
		    {
		        "field": "datetime",
		        "from": "2024-06-25 00:00:00",
		        "to": "2024-07-01 00:00:00"
		    }
		]
        	}
}

 

 

 

When I use this code in Postman (body -> raw), I'm able to pull back the correct filtered results.  When I put this same code into Microsoft Fabric in a Copy Data activity (Request body), it doesn't return the filtered results.

DevinL_1-1719946072887.png

 

 


I do not get an error, I just get the wrong unfiltered results.

 

If I use a Web activity and put the same code into the body, I get the correct results. I just don't know how to copy data from a web activity to a table in my datalake. Maybe this is the correct way of doing this? I'm not sure. 

 

Any help is greatly appreciated!

 

1 ACCEPTED SOLUTION
v-yilong-msft
Community Support
Community Support

Hi @DevinL ,

It seems that only when you can't use the above request code in Fabric, you also mentioned that the error is not displayed but the value of no request is displayed, but the request can be completed in Postman or Web activity, which may be caused by incompatibility with Fabric and not being recognized.

So I think you can use a web activity instead of a copy data activity might produce the right results. The output of the web activity can then be used as input for further processing.

Another point is to make sure that the API endpoints and parameters in Postman and Microsoft Fabric are exactly the same. You can also read this document: How to copy data using copy activity - Microsoft Fabric | Microsoft Learn

 

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
v-yilong-msft
Community Support
Community Support

Hi @DevinL ,

Have you solved your problem? If so, can you share your solution here and mark the correct answer as a standard answer to help other members find it faster? Thank you very much for your kind cooperation!

 

 

Best Regards

Yilong Zhou

v-yilong-msft
Community Support
Community Support

Hi @DevinL ,

It seems that only when you can't use the above request code in Fabric, you also mentioned that the error is not displayed but the value of no request is displayed, but the request can be completed in Postman or Web activity, which may be caused by incompatibility with Fabric and not being recognized.

So I think you can use a web activity instead of a copy data activity might produce the right results. The output of the web activity can then be used as input for further processing.

Another point is to make sure that the API endpoints and parameters in Postman and Microsoft Fabric are exactly the same. You can also read this document: How to copy data using copy activity - Microsoft Fabric | Microsoft Learn

 

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

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.

November Update

Fabric Monthly Update - November 2024

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

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.