Search code examples
asp.net-web-apississocratasoda

CMS Open Payments Data Limitation


I've finally got around to getting the code needed to import web API into my SQL environment. However, when I ran the SSIS Script Component package (Script Language: Visual Studio C# 2017) I was only able to retrieve 1000 records out of of millions. A consultant mentioned that I may have to incorporate the App Token into my code in order to access additional records.

Would someone be able to confirm that this true? And if so, how should it be coded?

Here is the code prior to my "ForEach" loop code:

    public override void CreateNewOutputRows()

    {


        //Set Webservice URL
        ServicePointManager.Expect100Continue = true;
        ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;



        string wUrl = "https://openpaymentsdata.cms.gov/resource/bqf5-h6wd.json";
        string appt = "MyAppToken";


        try

        {



            //Call getWebServiceResult to return our Article attributes

            List<Payment> outPutResponse = GetWebServiceResult(wUrl);

If there's an alternative method to using the app token (like in the HTTP Connection for example) please let me know.


Solution

  • Figured it out...

    https://openpaymentsdata.cms.gov/resource/bqf5-h6wd.json?$limit=10000&$$app_token="MyAppToken"