View all methods
userGroups.list
Retrieves a paginated list of all user groups for the current account.
Facts
| Method | GET https://api.getdx.com/userGroups.list |
| Required scope | user_groups:read |
Arguments
Required arguments
| Name | Type | Description |
|---|---|---|
token |
Token |
Auth token passed as an HTTP header. |
Optional arguments
| Name | Type | Description |
|---|---|---|
page |
Number |
Page number for pagination (default: 1). |
limit |
Number |
Number of results per page (default: 10). |
Example request
This is a typical request:
curl -X GET https://api.getdx.com/userGroups.list \
-H 'Accept: application/json' \
-H 'Authorization: Bearer xxxx-xxxxxxxxx-xxxx'
Example response
This is a typical success response:
{
"ok": true,
"groups": [
{
"id": "group_id",
"name": "Frontend Team",
"owner_id": "owner_id",
"owner_email": "owner@company.com",
"team_id": "team_id",
"members": [
{
"id": "user_id",
"email": "user@company.com",
"name": "John Doe"
}
],
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
],
"pagination": {
"current_page": 1,
"total_pages": 3,
"total_count": 25,
"per_page": 10
}
}
Errors
This table lists the expected errors that this method could return. However, other errors can be returned in the case where the service is down or other unexpected factors affect processing. Callers should always check the value of the ok param in the response.
| Error | Description |
|---|---|
not_authed |
No authentication token provided. |
invalid_auth |
Some aspect of authentication cannot be validated. |