Skip to content

Group List Request

The GroupListRequest retrieves the groups that are visible to your customer account. Groups are named containers used across FlexCloud to organise resources — for example, they can be assigned to devices (DeviceListRequest) or to power schedule sets (PowerScheduleSetListRequest) — and they are filtered on and referenced by id in many other requests.

Typical use cases:

  • Discovering the groups your authentication has access to before you filter other list requests by groups.
  • Rendering a name for a group id you already have (using detailTypes: [1] (NAMES) to include human-readable names).
  • Inspecting the resourceTypeId associated with each group to understand what kind of resources the group can contain.

Preparations

  • Launch the development client as described in the FlexConnect API — First Steps.
  • Navigate to http://localhost:8080/ui.
  • Select the documentation for Group List Request in the left pane.

Request

Run the GroupListRequest using the JSON body below.

  1. Run the request on app/v1/GroupListRequest.
  2. Set pagination.limit to the number of groups you want returned per page.
  3. Set detailTypes to control which optional attributes are included in the response.
  4. Optionally, add a filter to narrow the result set by group ids, resource-type ids, nested groups, tags, or attributes.

Request body

json
{
  "header": {
    "reqId": 1234,
    "timeoutMs": 10000
  },
  "pagination": {
    "limit": 100
  },
  "detailTypes": [1]
}

Request fields

FieldDescription
header.reqIdClient-defined identifier for the request. The same value is returned in the response header to correlate requests and responses.
header.timeoutMsMaximum time (in milliseconds) the platform waits for the result before responding with a timeout error.
pagination.limitMaximum number of groups returned in a single response.
pagination.cursorValueCursor value returned in a previous response as cursorNext or cursorPrevious. Use it to iterate through large result sets.
filter.groupIdsIf non-empty, only groups with these ids are returned.
filter.resourceTypeIdsIf non-empty, only groups associated with these resource types are returned.
filter.groupsIf non-empty, only groups that themselves belong to at least one of these parent groups are returned.
filter.tagsIf non-empty, only groups tagged with at least one of these tags are returned.
filter.attributesIf non-empty, only groups with matching attribute id and value are returned.
detailTypesList of optional detail types to include in the response. See detailTypes values.

detailTypes values

ValueCodeDescription
1NAMESInclude the human-readable names of nested groups, tags, and attributes in the response (otherwise only the ids are returned).

Filtering example

To list only the groups whose name has been resolved (via detailTypes: [1]), that belong to a specific parent group, and that carry a specific attribute value, use:

json
{
  "header": {
    "reqId": 1234,
    "timeoutMs": 10000
  },
  "pagination": {
    "limit": 100
  },
  "filter": {
    "groupIds": [1],
    "resourceTypeIds": [1],
    "groups": [{ "id": 1 }],
    "tags": [],
    "attributes": [{ "id": 1, "value": "2026-01-01" }]
  },
  "detailTypes": [1]
}

Response

Response body

json
{
  "header": {
    "reqId": 1234
  },
  "pagination": {
    "cursorNext": "1wsf="
  },
  "groups": [
    {
      "id": 1,
      "resourceTypeId": 1,
      "name": "Group 1",
      "description": "Group 1 description",
      "groups": [{ "id": 1, "name": "FHE internal groups" }],
      "tags": [],
      "attributes": [],
      "permissions": [{ "permissionTypeId": 1, "permissionCodeId": 1 }]
    }
  ]
}

Response fields

FieldDescription
groups[].idIdentifier of the group. Use this value as id when referencing the group from other requests (for example, in filter.groups of another list).
groups[].resourceTypeIdIdentifier of the resource type the group is associated with. Determines what kind of resources may be members of the group.
groups[].nameHuman-readable name of the group.
groups[].descriptionDescription of the group.
groups[].groupsList of parent groups the group itself belongs to. Names are only returned when detailTypes includes 1 (NAMES).
groups[].tagsTags associated with the group. Names are only returned when detailTypes includes 1 (NAMES).
groups[].attributesAdditional key/value metadata attached to the group. Names are only returned when detailTypes includes 1 (NAMES).
groups[].permissionsPermissions your authentication has on this group.
pagination.cursorNext / cursorPreviousReturned when the result set is larger than limit. Pass either value as pagination.cursorValue in a follow-up request to paginate.

Resolve names in one call

Include 1 (NAMES) in detailTypes when you need to display parent-group, tag, or attribute labels in a UI — otherwise the response only carries their ids and you would have to look each one up separately.

Pagination

When the number of matching groups exceeds pagination.limit, the response includes a pagination.cursorNext value (and a cursorPrevious value when iterating). Pass either value as pagination.cursorValue in a follow-up request — keeping filter and detailTypes unchanged — to retrieve the next or previous page. Iteration ends when no further cursor is returned.