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

    Erstellen sowie zuweisung von Cluster Member

    Scheduled Pinned Locked Moved Entwicklung
    3 Posts 2 Posters 524 Views 1 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.
    • J Offline
      jakob
      last edited by jakob

      Hallo,
      ich möchte eine Cluster gerne Members über die API zuweisen. Nur weiß ich leider nicht ganz wie das geht?
      iDoit-Version: 27
      API-Version: 1.14.1

      Hier mein Request:

      {"jsonrpc": "2.0",
      "method": "cmdb.category.save",
      "params": {
              "object": 23302, #ID meines Clusters
              "category": "C__CATG__CLUSTER_MEMBERS",
              "data": {"cluster_members": 23300 #ID meines Cluster-Members},
              "apikey": "xxx"
      }, "id": 1}
      

      Response:

      {
          "id": 1,
          "jsonrpc": "2.0",
          "error": {
              "code": -32603,
              "message": "Internal error: There are no usable properties for the category in the request.",
              "data": {
                  "Unusable keys": [
                      "cluster_members"
                  ],
                  "Available": [
                      "member"
                  ]
              }
          }
      }
      

      Wenn mir hierbei jemand weiterhelfen kann wäre ich sehr dankbar?

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

        Wenn Du im i-doit-System "Administration > Schnittstelle / externe Daten > JSON-RPC-API > Kategorien und Attribute" aufrufst und "Cluster > Cluster-Mitglieder" wählst, siehst Du, dass der Key der Kategorie C__CATG__CLUSTER_MEMBERS member heißt und der Datentyp integer[], also ein Array ist.

        J 1 Reply Last reply Reply Quote 0
        • J Offline
          jakob @MartinV
          last edited by

          @MartinV danke für die Antwort. Jetzt funktionierts ich hab übersehen das ich einen Array mitgeben muss.

          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