Passing parameter values in RESTful web services API using SSIS

I am consuming RESTful API web services from a software service vendor.  I am using a script task and an HTTP Connector in SSIS to download the information into a file and save it on a local machine.  This works fine if no parameters are needed.  

What I have as yet figured out how to do is to pass the parameter to the API URL.  Below is an example of the URL that is needed to connect to the RESTful Web services site.

https://api.apisite.com:8111/api/fleets/young/platforms/311305/data?descriptions=true&values=true¶meterId=10245&startTime=2015-09-08&endTime=2015-09-09&maxCount=1000&startPort=-1&resolution=all 

What I am looking for is how to pass a variable from SSIS to the Parameters startTime and endTime so I can automate the download of the needed data.
LVL 5
rtayIT DirectorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

lcohanDatabase AnalystCommented:
Here's something similar done with a OrderNumber
<<
In general, you will need a SQL task as the starting point which gets the list of order numbers from database, and saves query result into a variable of Object type, say "OrderNumberList". Then you have a foreach loop container to loop through the "OrderNumberList" variable, and assigning the current value into another variable "OrderNumber".

(If you have not done all of these before, this https://coldlogics.wordpress.com/2011/04/09/using-ssis-to-dynamically-create-data-files-from-a-full-result-set/ is a link that shows you how to loop through a database query result set.)

Place a Script task inside the foreach container, and choose "OrderNumber" as readonly variable, so you can reference the variable in the script. Then in the script, "OrderNumber" can be referenced as:
request = WebRequest.Create("http://dev2:10580/orderws/order/" +
    ((string) Dts.Variables["OrderNumber"].Value)) as HttpWebRequest;
>>

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Components

From novice to tech pro — start learning today.