Hi Saranya,
I have found another post on answers that may be able to help you on this effort, please check the following: Splunk DB Connect V3 - Automated / Programmatic creation of connections and inputs - https://answers.splunk.com/answers/516111/splunk-db-connect-v3-automated-programmatic-creati.html
... View more