Calling TRTH REST API from SSIS

I have a C# test console app that uses the REST API SDK . It works fine.

I copied the code to a script task within SSIS and now I get the error "Exception has been thrown by the target of an invocation". All I am doing at this point is getting a new UsersContext.

Has anyone successfully called the REST API from SSIS using the SDK?

Best Answer

  • Jirapongse
    Jirapongse admin
    Answer ✓

    You need to install all REST API assemblies into GAC. You can do it by running the command (gacutil -i) under Developer Command Prompt for Visual Studio with Run as administrator.

    C:\Users\Downloads\RESTAPIToolkit>gacutil -i ThomsonReuters.Dss.RestApi.Client.dll
    C:\Users\Downloads\RESTAPIToolkit>gacutil -i ThomsonReuters.Dss.Core.RestApi.Common.dll
    C:\Users\Downloads\RESTAPIToolkit>gacutil -i Microsoft.OData.Client.dll
    C:\Users\Downloads\RESTAPIToolkit>gacutil -i Microsoft.OData.Edm.dll
    C:\Users\Downloads\RESTAPIToolkit>gacutil -i Microsoft.OData.Core.dll
    C:\Users\Downloads\RESTAPIToolkit>gacutil -i Microsoft.Spatial.dll
    C:\Users\Downloads\RESTAPIToolkit>gacutil -i Newtonsoft.Json.dll