Get groups by organization (paginated)
Unlike "Get groups by organization" (GET /organizations/{organization}/groups), which authorizes each group individually via its ACL, this endpoint requires organization-wide group read permission and does no per-group filtering. It is therefore not a drop-in replacement: callers without org-wide group read receive an error rather than a filtered subset.
The q parameter uses the shared filter syntax. Bare terms (including multi-word)
perform a free-text search over group name and display name. search: is the only
accepted key and unknown keys return 400. Because group display names may contain
colons, a value with a colon must be quoted, e.g. search:"team: frontend"; an
unquoted colon fails with Query element "team:" cannot start or end with ':'.
This endpoint returns group summaries without the member roster: each group
carries only total_member_count and no members field. Callers that need the
roster use the group members endpoint (GET /groups/{group}/members).
CoderSessionTokenCoder-Session-Token<token>organization*stringOrganization ID or name
q?stringSearch query (see description for syntax and colon-quoting)
limit?integerPage limit
offset?integerPage offset
after_id?stringAfter ID
uuidOK
application/json- response
count?integergroups?array<>The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.
curl -X GET \ "$CODER_URL/api/v2/organizations/{organization}/paginated-groups" \ -H "Coder-Session-Token: $CODER_SESSION_TOKEN"{ "count": 0, "groups": [ { "avatar_url": "http://example.com", "display_name": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "organization_display_name": "string", "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", "organization_name": "string", "quota_allowance": 0, "source": "user", "total_member_count": 0 } ]}