cancel
Showing results for 
Search instead for 
Did you mean: 

Looking for sample API pipeline

mtran21
New Contributor III

I’m tasked to build a pipeline for API service. This pipeline will accept API calls for GET/PUT/POST/DELETE to a database table.

I am lost at how to get started. Please show me your example.

Thank you

5 REPLIES 5

marija_nikolovs
New Contributor II

Hello @mtran21

Here’s a simple pipeline for GET call:
RESTGet_MySQL

I’m using the following Service URL to GET weather info in this case for London:

RESTGET
As you can see, you need to provide your APPID, you will have that after successful registration on the OpenWeatherMap.

There’s a lot of different ways to get weather information about one or more cities.
Also, you can make this or another call using pipeline parameters as query parameters.

After a successful api call, you need a mapper, to make your data flat and to map only needed fields.

And then you can insert data in DB table, in this case I’m using MySql. No matter which DB you use, you are going to need an Account.

Hope this will help.
BR,
Marija

Hi @marija.nikolovska
Thank you for your help. I actually was looking for way to create my own API. My mistake was not explaining more detail from beginning.

Let’s say I have a database (SQL or Oracle) with a table that has Customer data. I want to use SnapLogic to build an API pipeline so that I can hand the API URL to web developers, so that they can use my API URL to GET the data from the database, or Post to the database, etc.

I hope that makes sense. Thanks again for your help.

Linus
Former Employee

Does the HTTP Router Snap help you? With such a Snap, you can expose your Pipeline as a Triggered Task, and route to a specific operation (e.g SQL Read, SQL Delete) based on the routing on the HTTP verb. Just make sure you use a Union Pipeline to group all unbound output views into a single one

SpiroTaleski
Valued Contributor

Hi @mtran21

The below post can help you to complete your task, in case you are using Ultra Tasks.

If you are using Triggered tasks, I am not sure if the Triggered tasks deliver components of the https message to the associated pipeline as a fields in the JSON document. In that case, one possible solution is the sender should pass the operation(GET/POST/PUT/DELETE) as a query parameter, so you can use a router snap to route every request based on the operation.

Regards,
Spiro Taleski