Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Working example/script task on consuming data from REST API

$
0
0

Hi all

I have googled my way through the internet searching for one working example of a script task in SSIS, that loads data into a table from an REST API. So far with no luck - it seems that everyone agree that it can be done using a script task, but it's apparently one of the best kept secrets.

So please if someone knows and actually have done it themselves, please give me an example of how to make the following work.

From the app company I got the following information

"The partnerkey is used for authentication. The response returned from the service contains the SessionToken, use this token in subsequent calls to the service to authenticate yourself." 

So I got the partnerkey. With the partner key I can get a sessionkey. Following info is provide from the app company

Request (JSON)
POST /login/application
Content-Type: application/json
{"Name":"micros", "Key":"<partnerkey goes here>"}

And once that works, department can be retrieved with this

Request (JSON)
GET /departments/application/?securityToken=<token>
Content-Type: application/json

So how would this fit into a SSIS flow. First use partnerkey to get a sessionkey. Then use that sessionkey to get department data


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>