Forum Discussion

hameed4ru's avatar
hameed4ru
Frequent Visitor
1 year ago
Solved

How to pass the date values dynamically to API in Dataflow Gen2

Hi Team,

 

How can I pass the date parameters externally to the Dataflow Gen2 which will be passing to an API. I can able to pass the parameters internally within the dataflow Gen2 but the same was not possible from outside of the dataflow.

 

Please suggest the solution.

 

  • Hi, hameed4ru 
    Can you please confirm whether you have resolved issue. If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. This will be helpful for other community members who have similar problems to solve it faster.  If not  can you please answer to the questions provided by miguel .

    If we don’t hear back, we’ll go ahead and close this thread.Should you need further assistance in the future, we encourage you to reach out via the Microsoft Fabric Community Forum and create a new thread. We’ll be happy to help.



    Thank you,
    Menaka 

5 Replies

  • miguel's avatar
    miguel
    Community Admin

    Hi! When you mention API, what specific API are you referring to? is it your own API ? are you trying to use the Web API connector within a Dataflow to make a GET request where you pass a date in the url?

  • v-menakakota's avatar
    v-menakakota
    Community Support

    Hi hameed4ru ,

    what specific API are you referring to? I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.

     

    Thank you.

  • v-menakakota's avatar
    v-menakakota
    Community Support

    Hi, hameed4ru 
    Can you please confirm whether you have resolved issue. If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. This will be helpful for other community members who have similar problems to solve it faster.  If not  can you please answer to the questions provided by miguel .

    If we don’t hear back, we’ll go ahead and close this thread.Should you need further assistance in the future, we encourage you to reach out via the Microsoft Fabric Community Forum and create a new thread. We’ll be happy to help.



    Thank you,
    Menaka 

  • hameed4ru's avatar
    hameed4ru
    Frequent Visitor

    Hi Miguel,

     

    I had a requirement from client where I need to pass start-date and end-date into an API dynamically,

    so I have configured these two variables inside the powerQuery and tried to pass them to the API-endpoint.

    as follows.

     

    startDate = Date.ToText(Date.AddMonths(Date.From(DateTime.LocalNow()), -3), "yyyy-MM-dd"),
      endDate = Date.ToText(Date.From(DateTime.LocalNow()), "yyyy-MM-dd")
     
    Thanks,
    Hameed