Design Studio Databroker Application Programming Interfaces

API

1. Set the environment configuration

Operation Name
configDB

Trigger

This API is invoked by Deployer/deploy.sh script to set the configuration details. For SQL Databroker fillowing fields are mandatory :

“database_name”: “string”,

“jdbc_driver_data_source_class_name”: “string”,

“table_name”: “string”,

“target_system_url”: “string”, //value should be JDBC URL.

For CSV Databroker following fields are mandatory :

“csv_file_field_separator”: “string”,

“first_row”: “string”,

“target_system_url”: “string”, // value will be file path. (currently supporting local file only.)

Request

{

“csv_file_field_separator”: “string”, //mandatory for csv databroker. “data_broker_type”: “string”, //mandatory “database_name”: “string”, //mandatory for SQL databroker “first_row”: “string”, //mandatory for csv databroker “jdbc_driver_data_source_class_name”: “string”, //mandatory for SQL databroker “local_system_data_file_path”: “string”, “map_inputs”: [

{

“input_field”: {

“checked”: “string”, “mapped_to_field”: “string”, “name”: “string”, “type”: “string”

}

}

],

“map_outputs”: [

{

“output_field”: {

“name”: “string”, “tag”: “string”, “type_and_role_hierarchy_list”: [

{

“name”: “string”, “role”: “string”

}

]

}

}

],

“password”: “string”, // DB password, will be set by deploy.sh “protobufFile”: “string”, “script”: “string”, “table_name”: “string”, //mandatory for SQL databroker “target_system_url”: “string”, // file path in case of CSV databroker and JDBC URL in case of SQL databroker. “user_id”: “string” // DB username, will be set by deploy.sh

}

Response

Success

{

“status”: 200, “message”: “Environment configured successfully !!!”

}

Error

{

“timestamp”: , “status”: 400, “error”: “Bad Request”, “exception”: “Exception details”, “message”: “Error Message”, “path”: “/configDB”

}

Behavior

Sets the below details required by Databroker for fetching, converting into protobuf format and pass it on to the Model connector. * The host and port of the machine where the File or Database is located * The login credentials (user Id, password) of the Target System (prompt by deploy.sh to the user) * The “data_broker_map” section of the Data Broker node from the Blueprint.json file * The string version of Protobuf file contents

2. Get Data

Operation Name

pullData

This operation fetch a record from the specified resource ( .csv or SQL DB)

Trigger

This operation is called by Model connector to fetch the data row.

Request

{}

Response

{

“Protobuf formatted data”

}

Behavior

Fetch the data row from the specified source and converts it into protobuf format as per the configuration details set.