Skip to main content

Query group membership

Read what's in a group, or find what groups an object belongs to. Use these patterns for auditing, verification, or feeding automation.

List members of a group​

  1. Open the group from the Groups list.
  2. Go to the Members tab.

Filter members by type​

Groups can hold objects of multiple kinds. To get just one kind, use an inline fragment:

query {
CoreStandardGroup(name__value: "<group-name>") {
edges {
node {
members {
edges {
node {
... on InfraDevice {
id
name { value }
site { node { name { value } } }
}
}
}
}
}
}
}
}

Replace InfraDevice with your target kind.

Find what groups an object belongs to​

Every object gains an automatic member_of_groups relationship. Use it to traverse from an object back to its groups:

query {
InfraDevice(id: "<device-id>") {
edges {
node {
name { value }
member_of_groups {
edges {
node { name { value } description { value } }
}
}
}
}
}
}

The same pattern works with subscriber_of_groups when you need to know what's observing a group.

Next​