Open kmasiello opened 4 months ago
It would be helpful to have a built in way to lookup by group name since this is pretty common. Here is the Python code I wrote to do this in a recipe with the SDK as in if its helpful...
group_guid = ""
group_name = "GROUP_NAME_HERE"
if not group_guid and group_name:
group_match = client.get("/v1/groups", params={"prefix": group_name}).json()
if not group_match["results"]:
raise Exception("Invalid group name")
elif len(group_match["results"]) != 1:
raise Exception("More than one group name found, ensure you enter a unique name")
else:
group_guid = group_match["results"][0]["guid"]
print(group_guid)
elif not group_name:
raise Exception("Either group_guid or group_name must be specified")
For:
Enable
group
find
/get
functionality similar to what is enabled forusers
, i.e.,