DH API
Folder Structure
- The RuncontrolServices folder structure is organized into three subfolders for services: OrchestratorServices, ExecutorServices, and UploadFiles.
- Each service folder initially contains three files: an executable file, a script, and a VBS file (only for Windows for running the service in the background).
Initial Setup
OrchestratorServices:
In orchestrator script, update the following as per the requirement: DB name(MSSQL or ORACLE), DB connection string, schema name and host url(ip:port).
The connection string will be of format:
MSSQL
Driver={ODBC Driver 17 for SQL Server};Server=servername;Database=dbname;UID=userid;PWD=password;
ORACLE
userid|password|servername:port/sid
ExecutorServices:
- In Executor script, update the following as per the requirement: executor url and orchestrator url.
UploadFiles:
- In Upload- Files script, update the following as per the requirement: DB name(MSSQL or ORACLE), DB connection string and schema name.
Starting the service
Linux:
- To start a specific service in Linux, simply run the corresponding script.
Windows:
- In Windows, starting the service in the background can be achieved by executing the specific VBS file, which internally calls the script.
Testing the service
- To ensure the functionality of the Orchestrator service, the following methods can be employed:
- Using Curl Command:
curl -X POST --url http://127.0.0.0:6443/batch_full_status/1 -H 'Content-Type: application/json' -d '{ "as_on_date": "2023-03-31", "batch_id": 1, "token" :"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJGRjAxNjM5NEJDM0M0MEJCOUJGRjJGRTRCQzIwQkFCNyIsImlhdCI6MTY4NTY4NTI1OSwiZXhwIjoyMTQ3NDgzNjQ4fQ.QXmLhaR8IRPuZAfm9XB7Sv5G2TpSOX8-rS3YbiOdEKQ"}'
Note: Adjust the IP and port (same as provided for the Orchestrator service), as_on_date, and batch_id according to the requirements.
- Using a Web Browser: If the curl utility is unavailable, the service can be tested by accessing the URL:
http://127.0.0.0:6443/batches/1
Note: Adjust the IP and port (same as provided for the Orchestrator service), and batch_id (/batches/batch_id) according to the requirements.