List groups for the tenant
GET
/v1/groups
const url = 'https://example.com/v1/groups?limit=50&source=local';const options = { method: 'GET', headers: { 'X-Tenant-ID': '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', Authorization: 'Bearer <token>' }};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/v1/groups?limit=50&source=local' \ --header 'Authorization: Bearer <token>' \ --header 'X-Tenant-ID: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ” X-Tenant-ID
required
string format: uuid
Tenant identifier. Must match the tenant associated with the credential. Returns 403 tenant_mismatch if the credential and header belong to different tenants.
Query Parameters
Section titled “Query Parameters ” limit
integer
Maximum number of items to return.
cursor
string
Opaque pagination cursor from a previous response. Omit for the first page.
source
string
Filter groups by source.
Responses
Section titled “ Responses ”OK
Media type application/json
object
data
required
Array<object>
object
id
required
string format: uuid
name
required
string
source
required
string
description
string
member_count
integer
role_mappings
Array<string>
created_at
required
string format: date-time
updated_at
required
string format: date-time
next_cursor
string
has_more
required
boolean
Example
{ "data": [ { "source": "local" } ]}Unauthenticated
Media type application/json
object
code
required
Machine-readable error code (e.g. “not_found”, “tenant_mismatch”).
string
message
required
Human-readable description of the error.
string
details
Optional additional context about the error.
object
key
additional properties
any
notices
Policy notices from determining Cedar rules, if applicable.
Array<string>
Example generated
{ "code": "example", "message": "example", "details": {}, "notices": [ "example" ]}Forbidden
Media type application/json
object
code
required
Machine-readable error code (e.g. “not_found”, “tenant_mismatch”).
string
message
required
Human-readable description of the error.
string
details
Optional additional context about the error.
object
key
additional properties
any
notices
Policy notices from determining Cedar rules, if applicable.
Array<string>
Example generated
{ "code": "example", "message": "example", "details": {}, "notices": [ "example" ]}