Zur Veranschaulichung und als kleine Hilfe möchten wir hier ein paar Beispielaufrufe, die per Shell abgesetzt werden können, auflisten.
Um die Statements möglichst kurz zu halten sind größere JSON Inhalte in Dateien ausgelagert:
export JSESSIONID=`curl -X POST -d '{"username":"nuclos", "password":""}' http://localhost:8080/nuclos-war/rest -H "Accept:application/json" -H "Content-Type:application/json" | awk -v FS="\"" '{ print $4 }'` |
Anhang insert_order_2002.json
curl -X POST -d @insert_order_2002.json http://localhost:8080/nuclos-war/rest/bos/example_rest_Order -H "Cookie:JSESSIONID=$JSESSIONID" -H "Content-Type:application/json" -H "Accept:application/json" |
Anhang update_order_1012.json
curl -X PUT -d @update_order_1012.json http://localhost:8080/nuclos-war/rest/bos/example_rest_Order/40000305 -H "Cookie:JSESSIONID=$JSESSIONID" -H "Content-Type:application/json" -H "Accept:application/json" |
Anhang update2_order_1012.json
curl -X PUT -d @update2_order_1012.json http://localhost:8080/nuclos-war/rest/bos/example_rest_Order/40000305 -H "Cookie:JSESSIONID=$JSESSIONID" -H "Content-Type:application/json" -H "Accept:application/json" |
order_1012
curl -X DELETE http://localhost:8080/nuclos-war/rest/bos/example_rest_Order/40000305 -H "Cookie:JSESSIONID=$JSESSIONID" |
order_1011 nach Finished
curl -X GET http://localhost:8080/nuclos-war/rest/boStateChanges/example_rest_Order/40000302/example_rest_ExampleorderSM_State_80 -H "Cookie:JSESSIONID=$JSESSIONID" |
curl -X DELETE http://localhost:8080/nuclos-war/rest -H "Cookie:JSESSIONID=$JSESSIONID" |