title: DIsplay all otrs ticket using soap api
body: <p>How can i display all the otrs tickets using a soap api. Individual ticket can be displayed by passing ticket id in url like this:</p>
  
  <pre><code>$url = "https://url/otrs/rpc.pl"; //// URL for OTRS server
  $username = "username"; //// SOAP username set in sysconfig
  $password = "password"; //// SOAP password set in sysconfig
  $TicketID = $_GET['id'];
    //////// Initialize new client session ////////
      $client = new SoapClient(
          null,
          array(
              'location' =&gt; $url,
              'uri' =&gt; "Core",
              'trace' =&gt; 1,
              'login' =&gt; $username,
              'password' =&gt; $password,
              'style' =&gt; SOAP_RPC,
              'use' =&gt; SOAP_ENCODED
          )
      );
  //////// Create and send the SOAP Function Call ////////
      $sql =
      $TicketDetails = $client-&gt;__soapCall("Dispatch",
          array($username, $password,
              "TicketObject", "TicketGet",
              "TicketID", $TicketID,
          ));
   $ticketInfo = array();
      $i = 0;
  
      foreach ($TicketDetails as $name =&gt; $value){ //// explode the xml response
          if (false !== strpos($name, "s-gensym")){
  
              $temp[$i] = $value;
              $v = $temp[$i - 1];
              if($i % 2 != 0){
                  $ticketInfo[$v] = $value;
              }
              $i++;
          }
      }
   var_dump($ticketInfo);
      exit();
  </code></pre>
  
  <p>How can i display all the tickets using api?????</p>