title: Jenkins: mark node as offline gets 403 Forbidden
body: <p>Maybe it's a dumb way to do so, but I'm trying to figure out the best one. Using JenkinsAPI from python, I'm running a job on a specific node using   </p>
  
  <pre><code>job.invoke("jobToken",False,False,3,5,{"NODE": node_name}).   
  </code></pre>
  
  <p>The job itself is trying to mark the node as temporary offline. What the job runs is specified in the Build -> Execute Shell -> Command in the job configuration screen.<br>
  Using   </p>
  
  <pre><code>wget "http://jenkins/computer/${NODE}/toggleOffline?offlineMessage=Taken_down"
  </code></pre>
  
  <p>I get a 403 Forbidden error on the console output.<br>
  Using   </p>
  
  <pre><code>curl "http://jenkins/computer/${NODE}/toggleOffline?offlineMessage=Taken_down"  
  </code></pre>
  
  <p>I get html response saying "Authentication required". (on the console output as well).<br>
  So my question is how to mark a node as offline, from within the job.<br>
  Thanks.</p>