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.

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

1 Answer

· Write an Answer
Upvote
Accepted
78.9k 250 52 74

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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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