Example for @JohnDMcMaster of how a REST API might work.
If the request is a POST, then read the data out and make the change, then return the current state.
If the request is a GET, then just return the current state.
Examples;
GET - curl "http://${SCOPE_IP}:8080/position"
POST with form data -- curl -d "axis.x=5.000&block=1" -X POST "http://${SCOPE_IP}:8080/position"
POST with JSON data -- curl -d '{"axis":{"x": 5.000}, "block": 1}' -H "Content-Type: application/json" -X POST "http://${SCOPE_IP}:8080/position"
Example for @JohnDMcMaster of how a REST API might work.
If the request is a POST, then read the data out and make the change, then return the current state. If the request is a GET, then just return the current state.
Examples;
GET
-curl "http://${SCOPE_IP}:8080/position"
POST
with form data --curl -d "axis.x=5.000&block=1" -X POST "http://${SCOPE_IP}:8080/position"
POST
with JSON data --curl -d '{"axis":{"x": 5.000}, "block": 1}' -H "Content-Type: application/json" -X POST "http://${SCOPE_IP}:8080/position"