question

BillBird-9016 avatar image
0 Votes"
BillBird-9016 asked BrunnoSantos-0662 commented

Query Parameters for a Rest API

Hello,
I have a vendor who has an API with "query parameters" but I can't get Azure to use them. This is what I tried;

  1. in the upper left you will see the vendors definition for the API

  2. the two images to the left show two different ways I tried to introduce the parameters with no success

If I can just edit the curl I would be set...so maybe my question is how to I do that instead of trying to use this GUI to key this in

29535-image.png


azure-data-factory
image.png (147.7 KiB)
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I have several of these running without any problems...it is only a problem when I introduce query parameters.

0 Votes 0 ·

Hello @BillBird-9016 are you still in need of assistance? I'm not sure how I missed this thread for so long.

Are the query parameters supposed to be in the URL like
...www.mysite.com/makequery?created_before=2020-10-01&created_after=2020-09-01...

In that case you would have to concatenate the parameters in the dataset's relative url

1 Vote 1 ·

@BillBird-9016 if you foudn your own solution, could you please share it here with the community?

0 Votes 0 ·

I was trying to do everything but this simple step, which I blindly missed. Thanks!

0 Votes 0 ·

1 Answer

rashiel avatar image
0 Votes"
rashiel answered

There are size and time limits (httpRequestTimeout) as to what Data Factory will accept for any response, regardless of how many records are returned. The first thing to keep in mind is if you have a very large API response, ADF may not read in all of it.

The built-in paging support has some caveats, in that the API you're calling must emit which are detailed at:
https://docs.microsoft.com/en-us/azure/data-factory/connector-rest#pagination-support

There are some solutions in another thread - https://social.msdn.microsoft.com/Forums/en-US/ab9faec5-8e08-467c-86b4-0072b871985b/unable-to-use-the-pagination-rules-in-rest-sources-in-adf?forum=AzureDataFactory

But these may not work for you depending on the format of the API you're calling

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.