Connection with Custom API

done
normal_priority
reply

(Rohit Kumar) #1

Hi Techies,

we have one custom API which returns data on each POST request. The request we usually send in POST method with dynamic parameter values, like start date and end date.

So we need to update the request body parameters value for each request then send it and and receive the data and save it on server.

In other took like Qlik, we have REST Connection where we do scripting for dynamic request and create a loop of dates, lets say request body needs two dates, startdate which is 1 Jan 2016 and enddate is 7 jan 2016 then send the request to API and receives data and then date+7 we add in both dates and send new request till current date and save all weeks data from historic years.

The same thing we are trying to do in Looker, we have one API url Https://API/ and request body and dates to be dynamic for reach request.

Note: I am saying its an custom API because its name is not in connection list of Looker.

Can you please help to know how to create Representational State Transfer connector in Looker and how to create in ETL to make request dynamic?

Thanks,
Rohit


(Izzy) #2

Hey Rohit, I’m trying to wrap my head around this question so let me know if I miss the mark! If you just want to more programmatically send data from Looker to another service in bulk, I think writing a script to do it using the Looker API would be the best way-- It sounds like the difference between Looker and Qlik is that with Looker, you’d just generate API keys and then use those in a script written outside of Looker in the language of your choice.

You could use our ruby SDK, or generate an API sdk in whichever language you’d like-- there’s a bunch of python examples floating around here