The REST API is documented at https://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTprolog . How to convert that into the programming language of choice is an exercise for the reader, but the REST Tutorial (https://docs.splunk.com/Documentation/Splunk/9.1.0/RESTTUT/RESTTutorialIntro) may help.