Client und Contact über eine API Abfrage erstellen
-
Hi, ich versuche im Moment viele Clients in I-DoIT zu übertragen.
Ich würde gerne per API sowohl den Client als auch die Kontaktzuweisung erstellen.
Bisher habe ich Probiert die Kontaktzuweisung über "C__CATG__CONTACT" zu erstellen komme da aber leider nicht weiter.Gibt es dafür eine schöne Lösung?
-
es gibt dazu 2 Möglichkeiten.
category.create
{ "jsonrpc": "2.0", "method": "cmdb.category.save", "params": { "apikey": "apikey", "language": "en", "category": "C__CATG__CONTACT", "object": 1122704399, "data": { "contact": 14, "role": 1 } }, "id": 1 }object.create with categories
{ "id": 1, "version": "2.0", "method": "cmdb.object.create", "params": { "type": "C__OBJTYPE__SERVER", "title": "MyLittleServer", "categories": { "C__CATG__CONTACT": [ { "contact": 14, "role": 1 } ], "C__CATG__MODEL": [ { "serial": "1337" } ] }, "apikey": "h3md6u3y", "language": "en" } } -
Danke erstmal für die zwei Beispiele.
Beide setzen aber voraus, dass der "contact" schon existiert - das ist bei mir nicht der Fall.
Da wäre halt die Idee beides in einer Abfrage zu vereinen, ich kann mir aber gut vorstellen, dass das so nicht vorgesehen ist.
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