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

    API Kategorie C__CATS__NET für C__OBJTYPE__LAYER3_NET anlegen

    Scheduled Pinned Locked Moved Entwicklung
    4 Posts 3 Posters 583 Views 2 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.
    • M Offline
      Montgomery
      last edited by

      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!

      1 Reply Last reply Reply Quote 0
      • MartinVM Offline
        MartinV
        last edited by

        IMHO ist die objID ein int und kein String.

        1 Reply Last reply Reply Quote 0
        • F Offline
          franknagel
          last edited by

          Versuchen Sie mal im ersten Fall bei cmdb.category.create statt catgID besser catsID oder einfach category zu nehmen.

          1 Reply Last reply Reply Quote 0
          • M Offline
            Montgomery
            last edited by

            Mit category funktioniert das Ganze. Vielen Dank für die Hilfe! ☺

            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