Dynamically generate RESTful APIs from static CSVs. Provides JSON
The simplicity with which CSV files can be created has made them the default data format for bulk data. It is comparatively more difficult to create an API to share the same data atomically and transactionally.
- JDK 17 or later
-
- Gradle 6.8+ (optional)
-
Clone the repository:
git clone https://github.com/opencelium/csv2api.git cd csv2api -
Activate the systemd file and add it to the Autostart:
ln -s "$(pwd)"/conf/csv2api.service /etc/systemd/system/csv2api.service systemctl daemon-reload systemctl enable csv2api
-
Start the service:
systemctl start csv2api
All examples use data from HERE
Get CSV as JSONP (default behavior) http://[Csv2APIServer]:8080?source=https://people.sc.fsu.edu/~jburkardt/data/csv/deniro.csv
Arguments
source: the URL to the source CSV
The service logs can be viewed via journalctl:
journalctl -xe -u csv2api -o cat -fThis command shows the live logs (-f) of the csv2api service.
CSV2API is released under the Apache-2.0 License.