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

    Client mit Kontakt mit API zu verbinden

    Scheduled Pinned Locked Moved Entwicklung
    2 Posts 2 Posters 422 Views 1 Watching
    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.
    • S Offline
      SHQuinn4Com
      last edited by

      Hallo!

      ich habe schon ein API, dass neue Clients bei I-DoIt erstellt, aber ich möchte es so erweitern, dass es den Client mit einem Kontakt verknüpft.

      Ich habe schon die Methode cmdb.category.create ausprobiert, aber ich bekomme immer wieder die untere Fehlermeldung:

      "message=Invalid parameters: Object id invalid. ID must be positive and higher than two"

      Als Test habe ich auch verscuht, ein Catergory Eintrag mit der Methode cmdb.category.save zu ändern, und bekomme die gleiche Meldung. Ich nutze Powershell, unter ist was ich bis jetzt geschrieben habe:

      $parameter = @{
              "category" = "C__CATS__PERSON_CONTACT_ASSIGNMENT"
              "apikey" = $APIKey
              "language" = "en"
              "object" = 9217
              "data" = @{
                  "objID" = 14131
                  "description" = "Computer"
                  }      
              
              }
      
      $Commands = @{
          "jsonrpc" = "2.0"
          "method" = "cmdb.category.create"
          "params" = $parameter
          "id" = 1
      }
      
      Invoke-RestMethod -uri xxxxxxxx -ContentType application/json -Method Post -Body ($Commands | ConvertTo-Json ) -Headers @{ Authorization = $Auth}
      
      

      Ich weiß, dass ich etwas verpasst habe, aber nachdem ich die Dokus gelesen habe, komme ich nicht weiter

      Danke!

      Michael HuhnM 1 Reply Last reply Reply Quote 0
      • Michael HuhnM Offline
        Michael Huhn @SHQuinn4Com
        last edited by

        Hallo @shquinn4com,

        kurz und schmerzlos 😆

        cmdb.category.save = Key -> object
        cmdb.category.create = Key -> objID

        1 Reply Last reply Reply Quote 0
        • First post
          Last post