Client mit Kontakt mit API zu verbinden
-
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!
-
Hallo @shquinn4com,
kurz und schmerzlos

cmdb.category.save = Key -> object
cmdb.category.create = Key -> objID
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