| Auszug |
|---|
|
Nuclos REST curl: JSESSIONID, POST, PUT, DELETE, bos, boStateChanges, -d @json, shell, example. |
Language: Deutsch · English
Example calls via shell
curl examples for the REST service – login, create/modify/delete BO, state change and logout.
| Status |
|---|
| colour | Green |
|---|
| title | Updated: Jul 2026 |
|---|
|
| Status |
|---|
| colour | Grey |
|---|
| title | applies to Nuclos 4.2026.x |
|---|
|
Practical example calls for the shell (curl). Larger JSON payloads are stored in files and passed with -d @file.json.
Login (session ID into a variable)
| Codeblock |
|---|
|
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 $8 }'` |
Create an order
| Codeblock |
|---|
|
curl -X POST -d @insert_order.json \
http://localhost:8080/nuclos-war/rest/bos/example_rest_Order \
-H "Cookie:JSESSIONID=$JSESSIONID" -H "Content-Type:application/json" -H "Accept:application/json" |
Modify an order
| Codeblock |
|---|
|
curl -X PUT -d @update_order.json \
http://localhost:8080/nuclos-war/rest/bos/example_rest_Order/40000305 \
-H "Cookie:JSESSIONID=$JSESSIONID" -H "Content-Type:application/json" |
Delete an order
| Codeblock |
|---|
|
curl -X DELETE http://localhost:8080/nuclos-war/rest/bos/example_rest_Order/40000305 -H "Cookie:JSESSIONID=$JSESSIONID" |
State change
| Codeblock |
|---|
|
curl -X GET http://localhost:8080/nuclos-war/rest/boStateChanges/example_rest_Order/40000302/example_rest_ExampleorderSM_State_80 -H "Cookie:JSESSIONID=$JSESSIONID" |
Logout
| Codeblock |
|---|
|
curl -X DELETE http://localhost:8080/nuclos-war/rest -H "Cookie:JSESSIONID=$JSESSIONID" |
Related pages
Nuclet import via REST
Nuclet import.
Open →