Community
    • Categories
    • Recent
    • Popular
    • Users
    • Search
    • Register
    • Login

    API Abfrage der Reports nicht mehr möglich

    Scheduled Pinned Locked Moved Betrieb
    3 Posts 2 Posters 372 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? Offline
      A Former User
      last edited by

      Hallo,

      nach einem Update der Version auf 1.15 können über die API keine Reports mehr abgefragt werden:

      Current version 1.15
      Current revision 202011500

       Internal error: Database error : Query error: 'SELECT *, (CASE isys_report__user_specific WHEN 1 THEN 'This report is only visible for you' WHEN 0 THEN 'Global' END) AS 'user_specific',
      				(CASE WHEN isys_report__querybuilder_data IS NULL OR isys_report__querybuilder_data = '' THEN '0' ELSE '1' END) AS 'with_qb',
      				isys_report_category__title AS 'category_title',
      				isys_report__category_report,
      				isys_report__query
      				FROM isys_report
      				LEFT JOIN isys_report_category ON isys_report_category__id = isys_report__isys_report_category__id WHERE isys_report__id IN (11) AND  isys_report__mandator = 1  ORDER BY isys_report__title ASC;':
      Table 'idoit_system.isys_report' doesn't exist
      

      Folgendes Python3 Skript löst den Fehler aus

      #!/usr/bin/env python3
      
      from jsonrpcclient.requests import Request
      from jsonrpcclient.clients.http_client import HTTPClient
      URL = "https://YOUR_IDOIT_INSTANCE/src/jsonrpc.php"
      apikey = "YOUR_API_KEY"
      
      client = HTTPClient(URL)
      resp = client.send(Request("cmdb.reports.read", apikey=apikey, id=1))
      

      Beste Grüße,
      RandomUser

      1 Reply Last reply Reply Quote 0
      • Philipp HörselmannP Offline
        Philipp Hörselmann
        last edited by

        Moin @RandomUser
        welche Version des API-Addons hast du aktuell installiert?
        Anhand der Fehlermeldung, vermute ich eine ältere API version, da die Reports nicht mehr in der idoit_system liegen.
        Mit i-doit 1.15 und dem aktuellen API Version 1.11.2 konnte ich den Fehler nicht reproduzieren.

        Viele Grüße
        Phil

        1 Reply Last reply Reply Quote 0
        • ? Offline
          A Former User
          last edited by

          Danke, das wars.

          Nach einem Update auf API Version 1.11.2 funktioniert nun auch alles wieder für mich.

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post