question

Upvotes
Accepted
3 0 0 3

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?

tick-history-rest-apissis
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Upvote
Accepted
50k 125 44 62

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
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.