AnsweredAssumed Answered

How to use the API to download datafiles

Question asked by Glen Parker on Nov 5, 2015
Latest reply on Apr 1, 2016 by Abdul Ghaffar

I found this document here from the beta days

https://beta.inshosteddata.com/docs/api

 

But it's got some serious gaps how to actually build the request

 

My immediate questions

1)  Has anyone got a fully working version of this process (minus the secrets, of course)  they could share?

 

2) 

The scheme to compute the signature is as follows:

HTTP_METHOD\n

Host_Header\n

Content-Type_header\n

Content-MD5_header\n

/path/to/resource\n

alphabetical=query&params=here\n

Date_header\n

API_secret

Which of these are variables, and which are strings?   How do we determine what values to put where?

 

3)  If we are using the Javascript example in the doc, where does the reqOpts object come from?   How does it get instantiated and populated?

 

4)      var sortedParts = [] for (var i = 0; i < sortedParams.length; i++) { var paramName = sortedParams[i] sortedParts.push(paramName + '=' + urlInfo.query[paramName]) }

It looks like sortedParts is an empty array, length=0, so what is this loop actually doing?

 

5)  Has anyone got a fully working version of this process (minus the secrets, of course)  they could share?

 

 

 

Thanks Glen

Outcomes