Get a list of ROI datasets

Description: Get a list of ROI datasets
URI: /datasets/ROI
http method: GET

@app.route('/datasets/ROI', methods=['GET'])
def list_ROI():
    cur = conn.cursor()
    query = "select relname as table from pg_stat_user_tables where schemaname = 'roi';"


    cur.execute(query)
    rows = [r for r in cur]
    datasets = []
    for row in rows:
        datasets.append(row[0])

    return jsonify({'datasets': datasets})

results matching ""

    No results matching ""