Community
    • Categories
    • Recent
    • Popular
    • Users
    • Search
    • Register
    • Login
    1. Home
    2. omueller
    O
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 3
    • Groups 1

    omueller

    @omueller

    Entwicklungspartner
    0
    Reputation
    1
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    omueller Unfollow Follow
    Entwicklungspartner

    Latest posts made by omueller

    • RE: Auslesen der Report ID's über die JSON API

      Hallo @lfischer,

      nach mehreren Tagen Fehleranalyse konnte ich den Fehler jetzt endlich finden. Der Error-Log an mir an der Stelle den entscheidenden Hinweis gegeben. Das Problem war eine fehlerhaft eingebundene Klasse. Diese habe ich nun entfernt und schon werden auch die Reports wieder angezeigt.

      Vielen Dank für die Unterstützung.

      Beste Grüße
      Oliver

      posted in Entwicklung
      O
      omueller
    • RE: Auslesen der Report ID's über die JSON API

      Hallo @lfischer,

      aktuell entwickle ich mit der i-doit Version 1.16. Die Version des API Add On weiß ich leider nicht. Wo kann ich das nachschauen? Ich bekomme vom API Call immer nur einen Fehler 500 zurück. Ich schließe mich aber auch nochmal mit meinem Auftraggeber kurz, ob auf dem System irgendwas speziell konfiguriert ist.

      Viele Grüße Oliver

      posted in Entwicklung
      O
      omueller
    • Auslesen der Report ID's über die JSON API

      Wie kann ich alle Report ID's über die JSON API Auslesen? Mit einer der älteren Versionen von i-doit hat das schon mal wunderbar funktioniert aber anscheinend wurde hier ein bisschen umgebaut und meine Abfrage liefert einen Error 500 zurück. Mein Code dazu sieht aktuell so aus:

      $curl = curl_init();
      $settings = $this->getSettings();
      $apiKey = $settings['idoit-api-key'];
      $apiURL = $settings['idoit-api-url'];

          $postfields = [
              'version'      => '2.0',
              'method'       => 'cmdb.reports',
              'id'           => 1,
              'params'       => [
                  'apikey'    => $apiKey,
                  'language'  => 'de'
              ],
          ];
      
          $postfieldsJson = json_encode($postfields);
      
          curl_setopt($curl, CURLOPT_URL, $apiURL);
          curl_setopt($curl, CURLOPT_FAILONERROR,true);
          curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
          curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
          curl_setopt($curl, CURLOPT_POSTREDIR, (1 | 2));
          curl_setopt($curl, CURLOPT_FRESH_CONNECT, true);
          curl_setopt($curl, CURLOPT_REDIR_PROTOCOLS, (CURLPROTO_HTTP | CURLPROTO_HTTPS));
          curl_setopt($curl, CURLOPT_POSTFIELDS, $postfieldsJson);
          curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
          curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
          curl_setopt($curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_DEFAULT);
          curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
          curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
          curl_setopt($curl, CURLOPT_ENCODING, 'application/json');
          curl_setopt($curl, CURLOPT_HTTPHEADER, array(
              'Content-Type: application/json',
              'Expect: 100-continue'
          ));
      
      
          $response = curl_exec($curl);
      

      Woran könnte das liegen bzw. was hat sich geändert?

      posted in Entwicklung
      O
      omueller