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:

 

Inhalt

Login

export SESSIONID=`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  }'`

 

Neue Order anlegen

Anhang insert_order_2002.json
curl -X POST -d @insert_order_2002.json http://localhost:8080/nuclos-war/rest/bos/example_rest_Order -H "sessionId:$SESSIONID" -H "Content-Type:application/json" -H "Accept:application/json"

 

Vorhandene Order ändern

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 "sessionId:$SESSIONID" -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 "sessionId:$SESSIONID" -H "Content-Type:application/json" -H "Accept:application/json"

 

Order löschen

order_1012
curl -X DELETE http://localhost:8080/nuclos-war/rest/bos/example_rest_Order/40000305 -H "sessionId:$SESSIONID"

 

Statuswechsel einer Order

order_1011 nach Finished
curl -X GET http://localhost:8080/nuclos-war/rest/boStateChanges/example_rest_Order/40000302/example_rest_ExampleorderSM_State_80 -H "sessionId:$SESSIONID"

 

Logout

curl -X DELETE http://localhost:8080/nuclos-war/rest -H "sessionId:$SESSIONID"