Navigation

    Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Search
    1. Home
    2. SHQuinn4Com
    S
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 2
    • Best 0
    • Groups 0

    SHQuinn4Com

    @SHQuinn4Com

    0
    Reputation
    1
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    SHQuinn4Com Follow

    Latest posts made by SHQuinn4Com

    • Das Erstellen von Clients per API

      Hallo zusammen,

      Ich bin relativ neu in i-doit und versuche, ein Powershell-Skript zu machen, das neu installierte Windows-Systeme automatisch in i-doit erstellt. Für den Teil der Übertragung des neuen Computers in i-doit habe ich das Folgende geschrieben:

      $Body = ConvertTo-Json @{
      jsonrpc = "2.0";
      method = "cmdb.category.save";
      params = @{
      apikey="our_api_key";
      Object=10872;
      category="C__CATG__MODEL";
      data = @{
      serial = "123wer123"
      }
      }
      id="1"
      }

      $Auth = "My_logon_Info"

      Invoke-RestMethod -uri http://Our.idoit.domain//src/jsonrpc.php -ContentType application/json -Method Post -Body $Body -Headers @{ Authorization = $Auth}

      Aber, ich bekomme immer wieder die untere Fehlermeldung:

      "message=i-doit system error: (object) ObjectId needs to be a integer value which references an existing object"

      Ich bin mir 100% sicher, dass das Objekt ID richtig ist, trotzdem funktioniert das Skript. Ich wäre seht dankbar, wann einer von euch das anschauen könnte.

      Danke!

      posted in Betrieb
      S
      SHQuinn4Com
    • Creating Clients via API

      Hello everyone,

      I am relatively new to i-doit and am trying to create a powershell script that will automatically enter newly installed Windows systems into i-doit in an effort to reduce human error. For the part of entering the new computer into i-doit I have written the below:

      $Body = ConvertTo-Json @{
      jsonrpc = "2.0";
      method = "cmdb.category.save";
      params = @{
      apikey="our_api_key";
      Object=10872;
      category="C__CATG__MODEL";
      data = @{
      serial = "123wer123"
      }
      }
      id="1"
      }

      $Auth = "My_logon_Info"

      Invoke-RestMethod -uri http://Our.idoit.domain//src/jsonrpc.php -ContentType application/json -Method Post -Body $Body -Headers @{ Authorization = $Auth}

      However I keep getting the response that:

      "message=i-doit system error: (object) ObjectId needs to be a integer value which references an existing object"

      I am 100% sure that the object ID is correct, I also tried the ID number in both "" and without. Any ideas what the problem is?

      Thanks!

      posted in Operating
      S
      SHQuinn4Com