title: How to retrieve the summary of a JIRA ticket via REST API?
body: <p>I am trying to write a shell script, that automates my workflow with JIRA. I aim for something like:</p>
  
  <pre><code>jira_flow start $KEY
  </code></pre>
  
  <p>The steps of the script shall be as follows:</p>
  
  <ul>
  <li>deploy current project to sonarqube</li>
  <li>create a new branch according to jira issue key and summary</li>
  </ul>
  
  <p>Therefore I need a way to get the summary of an issue.</p>
  
  <p>Firstly I tried using the <code>issue</code> API and <code>grep</code>.</p>
  
  <pre><code>curl http://jira.local:8081/rest/api/2/issue/$KEY | \
    json_pp | \
    grep sumarry
  
  # produces:
  
      "summary" : "linked issue summary 1"
      "summary" : "linked issue summary 2"
    "summary" : "sub-task summary 1"
    "summary" : "sub-task summary 2"
    "summary" : "sub-task summary 3"
  "summary" : "issue summary"
  </code></pre>
  
  <p>This approach gave me a lot of results, because it also prints the summaries of linked tickets and sub-tasks.</p>
  
  <p>My second try was using the <code>search</code> API and limit the fields to retrieve. This approach failed because I was not able to search for an issue by its <code>key</code>.</p>
  
  <pre><code>curl http://jira.local:8081/rest/api/2/search?jql=key=$KEY
  
  # returns:
  
  no matches found: http://jira.local/rest/api/2/search?jql=key=$KEY
  </code></pre>
  
  <p>Any advice?</p>