Skip to content
Snippets Groups Projects
Name Last commit Last update
README.md
config.json
requirements.in
server
server.py

supplyCouchdbJSON

install & activate

mkdir -p /usr/local/share/supplyCouchdbJSON
cd /usr/local/share/supplyCouchdbJSON
curl --silent --output - \
  https://gitlab1.ptb.de/niepra01/supplyCouchdbJSON/-/archive/master/supplyCouchdbJSON-master.tar \
  | tar xf - --strip-components=1           # only once
sudo zypper in python3-pip-tools  # Ubuntu: apt install python3-pip-tools
python3 -m venv .
source bin/activate
pip-compile --output-file=requirements.txt requirements.in
pip3 install -r requirements.txt
chown -R nobody.nobody $PWD       # Ubuntu: chown -R nobody.nogroup $PWD

systemctl daemon-reload                                # if already exist
systemctl link $PWD/supplyCouchdbJSON.service
systemctl enable supplyCouchdbJSON.service             # make permanent
systemctl start supplyCouchdbJSON.service      
systemctl status supplyCouchdbJSON.service             # running?
journalctl -f --unit supplyCouchdbJSON.service         # run-time check

api

supplyCouchdbJSON/dates (GET)

Returns a JSON file with an array of all date directories within the GitFS mount area.

curl -s http://localhost:5301/supplyCouchdbJSON/dates > theDates.json

supplyCouchdbJSON/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://localhost:5301/supplyCouchdbJSON/times/2020-02-05 > theTimes.json

supplyCouchdbJSON/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://localhost:5301/supplyCouchdbJSON/file/2020-02-05/09-49-04-9da869dfa9/000_SERVERS.json \
  > 000_SERVERS.json

RN (2021-01-06)