Yet Another BETYdb API (for metadata upload)
Following commands can be used to initialize the database to be used with YABA development.
docker-compose up -d postgres
docker-compose run --rm bety initialize
docker-compose run --rm bety sync
docker-compose up -d yaba_api
Once initialization and synchronization of bety database is done,the below command can be directly used to start the app.(Skip the "Setup BETYdb" step)
# Bring up full stack
docker-compose up
Following endpoints can be used to upload Metadata to respective tables in bety.
Experiments: (to experiments table):
curl -F "fileName=@input_files/experiments.csv" \
http://localhost:5001/yaba/v1/experiments?username=guestuser
Sites: (to sites table)
curl -F "fileName=@sites.csv" \
-F "shp_file=@input_files/S8_two_row_polys.shp" \
-F "dbf_file=@input_files/S8_two_row_polys.dbf" \
-F "prj_file=@input_files/S8_two_row_polys.prj" \
-F "shx_file=@input_files/S8_two_row_polys.shx" \
http://localhost:5001/yaba/v1/sites
Treatments: (to treatments table)
curl -F "fileName=@input_files/treatments.csv" \
http://localhost:5001/yaba/v1/treatments?username=guestuser
Cultivars: (to cultivars table)
curl -F "fileName=@input_files/cultivars.csv" \
http://localhost:5001/yaba/v1/cultivars
Citations: (to citations table)
curl -F "fileName=@input_files/citations.csv" \
http://localhost:5001/yaba/v1/citations?username=guestuser
Experiments_sites: (to experiments_sites table)
curl -F "fileName=@input_files/experiments_sites.csv" \
http://localhost:5001/yaba/v1/experiments_sites
Experiments_treatments: (to experiments_treatments table)
curl -F "fileName=@input_files/experiments_treatments.csv" \
http://localhost:5001/yaba/v1/experiments_treatments
Sites_cultivars: (to sites_cultivars table)
curl -F "fileName=@input_files/sites_cultivars.csv" \
http://localhost:5001/yaba/v1/sites_cultivars
Citations_sites: (to citations_sites table)
curl -F "fileName=@input_files/citations_sites.csv" \
http://localhost:5001/yaba/v1/citations_sites