Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.

...

Codeblock
languagetext
sessionId=`curl http://localhost:8080/nuclos-war/rest/login -X POST -H "Content-Type: application/json" -d '{"username":"nuclos", "password":"", "locale":"en-EN"}'`
 
ab Nuclos 4.3 - 4.5:
sessionId=`curl http://localhost:8080/nuclos-war/rest -X POST -H "Accept:application/json" -H "Content-Type: application/json" -d '{"username":"nuclos", "password":""}' | awk -v FS="\"" '{ print $4  }'`
Für alle folgenden Aufrufe muss die "sessionId" als Request-Parameter übergeben werden.
 
ab Nuclos 4.6:
curl --cookie-jar cookies.txt http://localhost:8080/nuclos-war/rest -X POST -H "Content-Type: application/json" -d '{"username":"'nuclos'", "password":"''"}';
Anstatt des "sessionId"-Request-Parameters wird das JSESSIONID Cookie über den Cookiestore verwendet.




Logout

Codeblock
languagetext
curl http://localhost:8080/nuclos-war/rest/logout?sessionid=$sessionId
 
ab Nuclos 4.3 - 4.5:
curl http://localhost:8080/nuclos-war/rest?sessionId=$sessionid -X DELETE
 
ab Nuclos 4.6:
curl --cookie-jar cookies.txt http://localhost:8080/nuclos-war/rest -X DELETE

Wartungsmodus initiieren

Codeblock
languagetext
 curl curl --cookie cookies.txt http://localhost:8080/nuclos-war/rest/maintenance/start?sessionid=$sessionId

Wartungsmodus beenden

Codeblock
languagetext
curl --cookie cookies.txt http://localhost:8080/nuclos-war/rest/maintenance/end?sessionid=$sessionId

Status abfragen

Codeblock
languagetext
curl --cookie cookies.txt http://localhost:8080/nuclos-war/rest/maintenance/mode

...

Codeblock
languagetext
 curl --cookie http://localhost:8080/nuclos-war/rest/maintenance/nucletexport/PE4A?sessionid=$sessionId > ~/temp/nucletexport.nuclet

...

Codeblock
languagetext
 curl --cookie -F "file=@~/temp/nucletimport.nuclet" "http://localhost:8080/nuclos-war/rest/maintenance/nucletimport?sessionid=$sessionId"