Skip to main content

Get All Groups

BETA

This endpoint is in beta and may change in future releases.

GET/workspaces/{workspaceId}/groups

Retrieves all groups in a workspace. Supports search and pagination.

Path Parameters
workspaceIdstringrequired
The unique identifier of the workspace.
Query Parameters
searchstringoptional
Filter groups by name.
pageintegeroptional
Page number for pagination. Defaults to 1.
per_pageintegeroptional
Number of items per page. Defaults to 20.
Error Responses
400
Query parameter validation failure — non-integer page/per_page or value less than 1.
401
Missing or invalid Authorization: Basic token.
404
workspaceId does not match any workspace.
451
EXTERNAL_API license not active on the instance.
500
Unexpected database error.
Request
curl -X GET "https://{your-domain}/api/ext/workspaces/{workspaceId}/groups?search=<search>&page=<page>&per_page=<per_page>" -H "Authorization: Basic <access_token>"
Response — 200
{
"data": [
  {
    "id": "grp_12345",
    "name": "Backend Engineers",
    "permissions": {},
    "granularPermissions": []
  }
],
"pagination": {
  "page": 1,
  "per_page": 20,
  "total_count": 1
}
}