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

    Client mit Kontakt mit API zu verbinden

    Scheduled Pinned Locked Moved Entwicklung
    2 Posts 2 Posters 534 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

        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