API Kategorie C__CATS__NET für C__OBJTYPE__LAYER3_NET anlegen
-
Hallo,
gerade versuche ich Layer3 Netzte bei uns anzulegen. Das Objekt wird auch ohne Probleme angelegt.
Aufruf:{ "jsonrpc": "2.0", "method": "cmdb.object.create", "id": 1, "params": { "title": "DESCH_10.106.3.0_255.255.255.0", "type": "C__OBJTYPE__LAYER3_NET", "purpose": "1", "apikey": "xxx" } }Feedback:
{ "id": 16976, "message": "Object was successfully created", "success": true }Danach versuche ich eine Kategorie C__CATS__NET für das eben angelegte Objekt anzulegen:
Aufruf:{ "jsonrpc": "2.0", "language": "en", "method": "cmdb.category.create", "id": 1, "params": { "catgID": "C__CATS__NET", "data": { "address": "10.106.3.0", "netmask": "255.255.255.0" }, "objID": "16976", "apikey": "xxx" } }Feedback:
{ "id": null, "message": "Error while creating category entry [This method is deprecated and will be removed in a feature release. Use 'cmdb.category.save' instead.]", "success": false }Können Sie mir hier weiterhelfen, den ich weiß nicht mehr was ich hier ändern soll. Nehme ich vorgeschlagen die Methode "cmdb.category.save' wird im Log noch folgender Hinweis angezeigt:
ERROR: An exception occured while processing request: -32602 Invalid parameters: Object id invalid. ID must be positive and higher than two.Doch aus meiner Sicht habe ich diese ID korrekt gesetzt.
Vielen Dank schon Mal!
-
IMHO ist die objID ein int und kein String.
-
Versuchen Sie mal im ersten Fall bei
cmdb.category.createstattcatgIDbessercatsIDoder einfachcategoryzu nehmen. -
Mit
categoryfunktioniert das Ganze. Vielen Dank für die Hilfe!
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