DB - API IFlow

Introduction

In this I flow the data flows from database to API. We fetch data from database and post the required fields to the API.

FLOW DIAGRAM

INTERFACE NAME: Product_SwissBake_Oracle_DB_To_Bizom_API_Prod

Requirement: We need to fetch Product data coming from oracle DB and filter the required fields and post the same to Bizom API.

Flow Structure:

Step 1: Post the bizom access token API using REST adapter

By using the provided credentials, we will hit the bizom token API and generate token.

The username and password is given for the authentication purpose.

API: https://api.bizom.in/oauth/directLogin/xml

REQUEST: <User>

<username>swissbakemaint</username>

<password>Swissb@ke</password>

</User>

Step 2: Client Oracle database

Database path :oracle.jdbc.driver.OracleDriver|jdbc:oracle:thin:@41.218.83.178:11553:ORCL|BTBSFA|salesapp

The database path contains the connector name, Database name,IP address of the client database and database credentials to establish the connection.

We get all the data present in the given time range when we retrieve the data using select query using the Database Adaptor.

We need to map the fields using response formatter to fetch the required fields from the database.

In step setting we have to give column count based on the columns which we are fetching and a stored procedure call.

Step 3: Posting to Client API

API:https://api.bizom.in/skunits/add/xml?access_token=${configs['0'].values['1']['Token']}

We post data fetched from the client database to Bizom API using the rest adaptor by formatting the request in request template.

Here client db retrive step is given as parent ID because after posting one record it goes back to the parent step to fetch another record.

Response type is based on response from the Client API after posting the data. Here it is custom_XML.

UPDATE_SUCCESS_COUNT, so that number of success records is updated.

STEP_SEARCH_CRITERIA, This is configured so that we can find any particular record in Step history by giving the key field in request search criteria of step history.

NOTE: The Request template should not be null it should contain an empty space at least.

Last updated