Storing data using API call in scheduled manner in database/file

Amit Madaan 1 Reputation point
2021-10-16T10:03:53.973+00:00

I have an API URL that show data if used in postman; and when visited directly in browser it allows to save a csv file on desktop.
I want to call and store the API data daily (auto schedule manner) to a cloud location /drive or database service of Azure.
Sample URL https://api.bseindia.com/BseIndiaAPI/api/HLDownloadCSV/w?scripcode=&HLflag=H&Grpcode=&indexcode=

if someone can help please suggest;
what I am trying to achieve is to store data from the URL on daily basis (once a day on a specific time) with date stamp of data

Azure CycleCloud
Azure CycleCloud
A Microsoft tool for creating, managing, operating, and optimizing high-performance computing (HPC) and big compute clusters in Azure.
59 questions
Microsoft Partner Center API
Microsoft Partner Center API
Microsoft Partner Center: A Microsoft website for partners that provides access to product support, a partner community, and other partner services.API: A software intermediary that allows two applications to interact with each other.
313 questions
Azure Health Data Services
Azure Health Data Services
An Azure offering that provides a suite of purpose-built technologies for protected health information in the cloud.
148 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Anurag Sharma 17,571 Reputation points
    2021-10-18T08:45:00.7+00:00

    Hi @Amit Madaan , welcome to Microsoft Q&A forum.

    We can do this activity with Azure Logic Apps.

    Firstly we need to create a Storage account where we will store all the csv files. Its very straight forward:

    Create a storage account

    Then we can create a logic app as mentioned below. It can be scheduled as per our requirements, in below screenshot it is scheduled once a day:

    Setting schedule:

    141333-image.png

    Defining Http action with get method:

    141304-image.png

    Finally loading the csv file to the storage account we created:

    141293-image.png

    Once this runs, we can check the container in storage account, it should have the csv file:

    141324-image.png

    This is one method, another way is through Windows Scheduler as mentioned in below article. But here we need to download the file by writing any custom code.

    Windows Scheduler task to backup your data to storage account using AzCopy Utility & SAS token

    Please let me know if this helps or else we can discuss further.

    ----------

    Please don't forgot to click on accept it as answer button 141306-image.png wherever the information provided helps you. This can be beneficial to other community members as well.

    0 comments No comments