An agwt to vl REST interface.
Table of Contents
Download latest standalone jar
from http://a75438.berlin.ptb.de/vlagwt/
java -jar vlagwt-x.y.z-standalone.jar
cd /path/to/vlagwt
sudo mkdir /usr/local/share/vlagwt
sudo cp vlagwt.jar /usr/local/share/vlagwt
sudo cp vlagwt.service /etc/systemd/system/
sudo systemctl enable vlagwt.service
sudo systemctl start vlagwt.service
sudo systemctl status vlagwt.service
Set:
URL=http://localhost:9099
if the server runs at localhost
. For PUT
or POST
of json data set the content type by:
H="Content-Type: application/json"
curl $URL/todo
The /convert
endpoint returns the planning document generated from
the calibration request.
curl -H "$H" -d @resources/calibration-request.json -X POST $URL/convert
Use the json file under resources/calibration-request.json
and send the request:
curl -H "$H" -d @resources/calibration-request.json -X POST $URL/request
which leads to the following steps:
- input data (
inquiry
shortinq
) checks - convert
inq
to a planning document (shortpla
) - sends a notification email
- stores the document (
pla
) in the vl database
If everything goes right the reply is:
{"ok":true,"error":null}
in case of an error:
{"error":"<description of reason for error>", "ok":false}
The /planning/<RequestId>
endpoint returns the planning document
belonging to the <RequestId>
.
curl $URL/planning/<RequestId>
Example:
curl $URL/planning/34330b0e9f16c21007b37f2d56bf1804
returns
{"_id":"pla-2021-05-29-zenit","_rev":"1-7b647b22286b4de0dafeb36c023094f3","Planning":{"RequestId":"34330b0e9f16c21007b37f2d56bf1804" ...}
curl $URL/planning/foo
returns
{"error":"Not found","ok":false}
curl $URL/dcc/<RequestId>