run.py
def Append_dataset():
    """
    Post call to append dataset.json file with user inputs
    """

    #retrieve the json from the ajax call
    jsonFile = ''
    if request.method == 'POST':
        jsonFile = request.json
        print ("post request")

    #if jsonFile successfully posted..
    if jsonFile != '':
        # check all required arguments are present:
        if not all(arg in jsonFile for arg in ["deviceIds","dates","datasetName","dbName"]):
            print("Missing arguments in post request")
            return json.dumps({"status":"Error", "messages":"Missing arguments"}), 422
        inputDeviceIds = jsonFile["deviceIds"]
        inputDates = jsonFile["dates"]
        inputDatasetName = jsonFile["datasetName"]
        inputDbName = jsonFile["dbName"]
        print("retreived data: " + str(inputDeviceIds) + " | " + str(inputDates) + " | " + str(inputDatasetName) + " | " + str(inputDbName))

    return json.dumps(dataset.Append_dataset(inputDeviceIds, inputDates, inputDatasetName, inputDbName))

    Post call to append dataset.json file with user inputs
    
Post call to append dataset.json file with user inputs
Post call to append dataset . json file with user inputs
def Append_dataset():
    jsonFile = ''
    if request.method == 'POST':
        jsonFile = request.json
        print ("post request")
    if jsonFile != '':
        if not all(arg in jsonFile for arg in ["deviceIds","dates","datasetName","dbName"]):
            print("Missing arguments in post request")
            return json.dumps({"status":"Error", "messages":"Missing arguments"}), 422
        inputDeviceIds = jsonFile["deviceIds"]
        inputDates = jsonFile["dates"]
        inputDatasetName = jsonFile["datasetName"]
        inputDbName = jsonFile["dbName"]
        print("retreived data: " + str(inputDeviceIds) + " | " + str(inputDates) + " | " + str(inputDatasetName) + " | " + str(inputDbName))
    return json.dumps(dataset.Append_dataset(inputDeviceIds, inputDates, inputDatasetName, inputDbName))
def Append_dataset ( ) : jsonFile = '' if request . method == 'POST' : jsonFile = request . json print ( "post request" ) if jsonFile != '' : if not all ( arg in jsonFile for arg in [ "deviceIds" , "dates" , "datasetName" , "dbName" ] ) : print ( "Missing arguments in post request" ) return json . dumps ( { "status" : "Error" , "messages" : "Missing arguments" } ) , 422 inputDeviceIds = jsonFile [ "deviceIds" ] inputDates = jsonFile [ "dates" ] inputDatasetName = jsonFile [ "datasetName" ] inputDbName = jsonFile [ "dbName" ] print ( "retreived data: " + str ( inputDeviceIds ) + " | " + str ( inputDates ) + " | " + str ( inputDatasetName ) + " | " + str ( inputDbName ) ) return json . dumps ( dataset . Append_dataset ( inputDeviceIds , inputDates , inputDatasetName , inputDbName ) )
Post call to append dataset.json file with user inputs
Post call to append dataset . json file with user inputs
"""
    Post call to append dataset.json file with user inputs
    """ #retrieve the json from the ajax call #if jsonFile successfully posted.. # check all required arguments are present: