gbv / jskos-server

Web service to access JSKOS data
https://coli-conc.gbv.de/api/
MIT License
6 stars 4 forks source link

Import Script: add option to not use bulk import #141

Open nichtich opened 3 years ago

nichtich commented 3 years ago

The import script uses bulk import so record that cannot be imported are silently ignored. Add an option such as --individual to import records one by one and emit errors. Result should be the similar to iterating over records and calling

curl -H "Content-Type: application/json" -d@record.json -X POST http://localhost:3000/data

for each record but the latter requires write endpoint to be enabled.

stefandesu commented 3 years ago

We could also import records one by one by default and add a flag --bulk to do bulk import. This might be more like what you'd expect if you used the import script.