question

Upvotes
Accepted
3 0 0 2

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 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvote
Accepted
38.1k 69 35 53

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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea