accessGitFS
For a detailed description of the web application »vl_db-Historie« that uses this server, see this Wiki article.
install & activate
mkdir -p /usr/local/share/accessGitFS
cd /usr/local/share/accessGitFS
curl --silent --insecure --output - \
https://a75436.berlin.ptb.de/rolf.niepraschk/accessGitFS/-/archive/master/accessGitFS-master.tar \
| tar xf - --strip-components=1 # only once
sudo apt install python3-pip # openSUSE: sudo zypper in python3-pip
python3 -m venv .
source bin/activate
pip3 install pip-tools
pip-compile --output-file=requirements.txt requirements.in
pip3 install -r requirements.txt
chown -R nobody.nogroup $PWD # openSUSE: chown -R nobody.nobody $PWD
systemctl daemon-reload # if already exist
systemctl link $PWD/accessGitFS.service
systemctl enable accessGitFS.service # make permanent
systemctl start accessGitFS.service
systemctl status accessGitFS.service # running?
journalctl -f --unit accessGitFS.service # run-time check
api
accessGitFS/dates (GET)
Returns a JSON file with an array of all date directories within the GitFS mount area.
curl -s http://a75436:5017/accessGitFS/dates > theDates.json
accessGitFS/times/YYYY-mm-dd (GET)
Returns a JSON file with an array of all time directories within the GitFS mount area matching the specified date.
curl -s http://a75436:5017/accessGitFS/times/2020-02-05 > theTimes.json
accessGitFS/file/YYYY-mm-dd/HH-MM-SS-XXXXXXXXXX/xyz.json (GET)
Returns the version of a file with the specified commit date.
curl -s http://a75436:5017/accessGitFS/file/2020-02-05/09-49-04-9da869dfa9/000_SERVERS.json \
> 000_SERVERS.json
With pretty print:
curl -s http://a75436:5017/accessGitFS/file/2021-01-07/14-32-48-7696828dc3/000_SERVERS.json \
| jq -M
or
curl -s http://a75436:5017/accessGitFS/file/2021-01-07/14-32-48-7696828dc3/000_SERVERS.json \
| python3 -m json.tool
accessGitFS/version (GET)
Returns the version of the accessGitFS server.
curl -s http://a75436:5017/accessGitFS/version
RN (2021-01-07)