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?

2
  • 2
    Use System.Net.WebClient? Commented Nov 30, 2016 at 13:24
  • which version of SSIS are you using? Commented Nov 30, 2016 at 23:09

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

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.
Try using System.Net.Http and System.Net.Http.HttpClient in order work with Rest services.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.