API - Net zone anlegen - wo ist der Fehler
-
Hallo,
ich versuche, über das API zu einem bestehenden Layer-3-Netz Zonen hinzuzufügen.
Wenn ich die Zone im UI anlege, sieht sie im API anschließend so aus:
{ "id": "15320", "objID": "15314", "zone": { "id": "15314", "title": "routing", "sysid": "SYSID_1638197798", "type": "C__OBJTYPE__NET_ZONE", "type_title": "Net zone" }, "range_from": "10.100.81.252", "range_from_long": "174346748", "range_to": "10.100.81.254", "range_to_long": "174346750", "description": "Beschreibung" }Wenn ich versuche eine Zone im API anzulegen, sind "objID" und "zone" immer null. Ich verwende folgenden API-Aufruf:
{ "method": "cmdb.category.save", "params": { "object": 20132, "category": "C__CATS__NET_ZONE", "data": { "objID": "15314", "range_from": "10.100.81.242", "range_to": "10.100.81.244", "description": "Beschreibung" } } }Damit bekomme ich folgende Zone:
{ "id": "15321", "objID": null, "zone": null, "range_from": "10.100.81.242", "range_from_long": "174346748", "range_to": "10.100.81.244", "range_to_long": "174346750", "description": "Beschreibung" }Was mache ich falsch?
Mit freundlichem Gruß,
Mathias -
Ich hab es selbst herausbekommen, hat nur ein paar Tage gedauert.
{ "method": "cmdb.category.save", "params": { "object": 20132, "category": "C__CATS__NET_ZONE", "data": { "zone": "15314", "range_from": "10.100.81.242", "range_to": "10.100.81.244", "description": "Beschreibung" } } }Das Attribut heißt "zone", nicht "objID"!
Mit freundlichem Gruß,
Mathias
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