Jenkins, How to Start, Stop or Restart your Instance
URL
http://<jenkins.server>/restart
http://<jenkins.server>/safeRestart
http://<jenkins.server>/exit
http://<jenkins.server>/safeExit
http://<jenkins.server>/quietDown
http://<jenkins.server>/cancelQuietDown
Remote API
URL can be invoked by a Remote API.
Using wget:
$ wget --user=<user> --password=<password> http://<jenkins.server>/restart
$ wget --user=<user> --password=<password> http://<jenkins.server>/safeRestart
$ wget --user=<user> --password=<password> http://<jenkins.server>/exit
$ wget --user=<user> --password=<password> http://<jenkins.server>/safeExit
$ wget --user=<user> --password=<password> http://<jenkins.server>/quietDown
$ wget --user=<user> --password=<password> http://<jenkins.server>/cancelQuietDown
Using cURL:
$ curl -X POST -u <user>:<password> http://<jenkins.server>/restart
$ curl -X POST -u <user>:<password> http://<jenkins.server>/safeRestart
$ curl -X POST -u <user>:<password> http://<jenkins.server>/exit
$ curl -X POST -u <user>:<password> http://<jenkins.server>/safeExit
$ curl -X POST -u <user>:<password> http://<jenkins.server>/quietDown
$ curl -X POST -u <user>:<password> http://<jenkins.server>/cancelQuietDown
Jenkins CLI:
$ java -jar jenkins-cli.jar -s http://<jenkins-server>/ restart
$ java -jar jenkins-cli.jar -s http://<jenkins-server>/ safe-restart
$ java -jar jenkins-cli.jar -s http://<jenkins-server>/ shutdown
$ java -jar jenkins-cli.jar -s http://<jenkins-server>/ safe-shutdown
$ java -jar jenkins-cli.jar -s http://<jenkins-server>/ quiet-down
$ java -jar jenkins-cli.jar -s http://<jenkins-server>/ cancel-quiet-down