SpoutDev/Spouty — Issue #1: Implement Jenkins API
Author: Wulfspider
Created: 2011-10-12 04:12:31+00:00
State: open
Labels: To-do

**Create Job**
To create a new job, post config.xml to this URL with query parameter name=JOBNAME. You'll get 200 status code if the creation is successful, or 4xx/5xx code if it fails. config.xml is the format Jenkins uses to store the project in the file system, so you can see examples of them in /var/lib/jenkins.

**Copy Job**
To copy a job, send a POST request to this URL with three query parameters name=NEWJOBNAME&mode=copy&from=FROMJOBNAME

**Build Queue**
Build queue has its own separate API.

**Load Statistics**
Overall load statistics of Jenkins has its own separate API.

**Restarting Jenkins**
Jenkins will enter into the "quiet down" mode by sending a request to this URL. You can cancel this mode by sending a request to this URL. On environments where Jenkins can restart itself (such as when Jenkins is installed as a Windows service), POSTing to this URL will start the restart sequence, or this URL to restart once no jobs are running. All these URLs need the admin privilege to the system.