1

I am looking for a way to consume a REST API in an SSIS Script Task with C#. I cannot use RestSharp or the Microsoft.Aspnet.Webapi.Client because they are not in the GAC.

I need to call the Rest API (POST) for each row to get a result and then write it back to an output.

Is there a possibility to access a REST API without an assembly?

CDspace
  • 2,639
  • 18
  • 30
  • 36
l0wsk1ll3d
  • 11
  • 1
  • 2

1 Answers1

0

@l0wsk1ll3d,

I originally asked which version because the more recent the version of SSIS you are working with the more options you have available regarding rest api services.

@stuartd is pointing you to a general way in which you can tap into making requests. This question has been addressed very well in a post by @mikeTheLiar (ironically, Mike is truthful here! :)) Here is the posted answer.

Community
  • 1
  • 1
plditallo
  • 701
  • 2
  • 13
  • 31
  • Thanks for your answer. I am using Visual Studio 2015 with Integration Services Designer Version 13.0 and Data Tools 14.0. The Script Task is using .NET 4.5 as far as I can see. When adding `using System.Net.WebClient;` I get an error that WebClient could not be found in Namespace "System.Net" and that I should add an reference to the assembly. However the assembly "System.Net.WebClient" is not in the reference manager. – l0wsk1ll3d Dec 01 '16 at 08:27
  • Try using System.Net.Http and System.Net.Http.HttpClient in order work with Rest services. – plditallo Dec 05 '16 at 20:00