title: How can I finish this CURL request to OTRS 5.0?
body: <p>I'm trying to automatise a process in OTRS that is to look in specific queue to find all the closed ticket in the last 8 days. I want to do it in a bash script using Curl requests. So far i got this line working for me :</p>
  
  <pre><code>curl -sk "https://tstotrs.unil.ch/otrs/nph-genericinterface.pl/Webservice/TimeToREST/TicketSearch?UserLogin=$user&amp;Password=$pass&amp;Queue=62&amp;StateIDs=$stateid" -X GET |jq -r .TicketID[]
  </code></pre>
  
  <p>It gives me a list of TicketID that are closed in the queue number 62. The problem I encounter is that i want to transform them into ticket number not only ticket ID and I wish to add a condition that says only the one closed the last 8 days.</p>
  
  <p>I'm stuck trying to do the loop to transform ticketID in ticket numbers.</p>