Erstellen sowie zuweisung von Cluster Member
-
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.1Hier 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?
-
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.
-
@MartinV danke für die Antwort. Jetzt funktionierts ich hab übersehen das ich einen Array mitgeben muss.
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