Forum Discussion

RunLevelZero's avatar
6 months ago
Solved

API To Add To ABCG - Auto Balanced Collector Group

Let me preface this with I am new to the company I am doing this for as well as LM api calls. I hope this is possible or someone can steer me in the right direction. I am currently making an API call and successfully adding the system to LM as well as some device groups. Currently I am telling it a specific collector group or preferred collector group. Following the guide provided to me from my company on how to manually add a device to LM, it just has Auto Balanced. When I look at existing systems it also just shows Auto Balanced. Mine of course has the specific preferred collector group I assigned it. I would like to add via the API to the “Auto Balanced” collector group. When I send 0 or null the API call doesn’t like me. {"errorMessage":"Collector(id=0) does not exist","errorCode":1404,"errorDetail":null}. Is the message I get in return. Also when making an API call to get the collector groups I don’t see Auto Balanced. So is there a way to put the system into Auto Balanced? I need to be able to mimic the current way it is being done via the manual process. Thanks in advance and thank you very much @Stuart Weenig . I was able to use your guidance from other posts to get my api calls working.

  • Ok I got this working. Lunch break was apparently needed :). I set the autoBalancedCollectorGroupId to the proper ID and then the preferred collector to 0.

6 Replies

  • Ah but maybe just not when I am creating the device. Thank you I will try the patch option.

    • Stuart_Weenig's avatar
      Stuart_Weenig
      Icon for Mastermind rankMastermind

      Nah, you should be able to do it when posting the device. it looks like "autoBalancedCollectorGroupId" and "preferredCollectorId" are both fields in the post body.

  • Hi, I am also trying to make this work. Can you clarify please? Do you make 2 separate API calls, one for the collector group and then one for the preferred ID being set to zero? Is it possible to do it in one call or no?

    • Stuart_Weenig's avatar
      Stuart_Weenig
      Icon for Mastermind rankMastermind

      IIRC, you're patching the device to update the collector. You can do that in one call, updating both fields.

  • Ok I got this working. Lunch break was apparently needed :). I set the autoBalancedCollectorGroupId to the proper ID and then the preferred collector to 0.