cURL Samples
Unlike the other code samples given in this section, these samples are simple commands that can
be run from any server command line with the
curl
program installed in order to communicate with MWS.
GET
curl -u admin:secret -X GET -H "Content-Type: application/json" http://localhost:8080/mws/rest/jobs
POST
curl -u admin:secret -X POST -H "Content-Type: application/json" http://localhost:8080/mws/rest/jobs
-d '{"commandFile":"/tmp/test.sh","initialWorkingDirectory":"/tmp","user":"adaptive","requirements":[{"requiredNodeCountMinimum":1}]}'
PUT
curl -u admin:secret -X PUT -H "Content-Type: application/json" http://localhost:8080/mws/rest/jobs
-d '{"holds":["user"]}'
DELETE
curl -u admin:secret -X DELETE -H "Content-Type: application/json" http://localhost:8080/mws/rest/jobs