title: cURL to call REST Api
body: <p>So I want to call a REST API from Bamboo after a deployment has completed.
  This API needs a username and password but it can't be stored in Bamboo as it seems it can be viewed in the Bash History of the Build agent.</p>
  
  <p>I intended to use a script task and execute something like</p>
  
  <pre><code>curl -f -v -k --user "${bamboo.user}":"${bamboo.password}" -X POST https://bamboo.url/builds/rest/api/latest/queue/project_name"/
  </code></pre>
  
  <p>This would make the REST call.   But the username and password is a problem.</p>
  
  <p>I do have the option, however of using a PEM file.  It can be provided so does anyone know if this can be used in conjunction with the cURL?</p>
  
  <p><strong>--OR--</strong></p>
  
  <p>One other thought- could I encrypt a password within a file in my source control, and somehow decrypt it on the build agent, and then have curl use the file instead of reading the password from the command line?  How would this look in cURL?</p>
  
  <p>Any ideas how this could be achieved?</p>