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"}'`
 
# 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.




...

Codeblock
languagetext
curl http://localhost:8080/nuclos-war/rest/logout?sessionid=$sessionId
 
# 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
# bis 4.28
curl --cookie cookies.txt http://localhost:8080/nuclos-war/rest/maintenance/start


# ab 4.29
curl --cookie cookies.txt -X PUT "http://localhost:2019/nuclos-war/rest/maintenance/mode" -d on
curl --cookie cookies.txt -X PUT "http://localhost:2019/nuclos-war/rest/maintenance/mode?force=true" -d on # es wird nicht darauf gewartet, bis alle Clients abgemeldet sind

Wartungsmodus beenden

Codeblock
languagetext
# bis 4.28
curl --cookie cookies.txt http://localhost:8080/nuclos-war/rest/maintenance/end

# ab 4.29
curl  --cookie cookies.txt -X PUT "http://localhost:2019/nuclos-war/rest/maintenance/mode" -d off

Status abfragen

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

...

Codeblock
languagetext
 curl --cookie -X POST http://localhost:8080/nuclos-war/rest/maintenance/nucletexport/PE4A > ~/temp/nucletexport.nuclet

...