Get resource groups for a user
Retrieve paginated list of resource groups the user belongs to
Path Parameters
- Type: stringFormat: uuididrequired
User ID
Query Parameters
- Type: integerpagemin:1
Page number (1-indexed, default: 1)
- Type: integerlimitmin:1max:100
Items per page (max: 100; default varies by endpoint)
- Type: stringsearch
Search term to filter resource groups by name
- Type: stringsort
Sort field and direction (e.g., "createdAt:desc", "name:asc"). Supports comma-separated values for multi-column sorting.
Responses
- application/json
- application/json
- application/json
- application/json
Request Example for get/users/{id}/resource-groups
curl 'https://api.gpcn.com/v1/users/123e4567-e89b-12d3-a456-426614174000/resource-groups?page=1&limit=1&search=&sort=createdAt%3Adesc' \
--header 'X-API-Key: YOUR_SECRET_TOKEN'
{
"success": true,
"message": "",
"data": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Engineering",
"roles": [
{
"name": "tenant-admin",
"displayName": "Tenant Admin"
}
]
}
],
"meta": {
"total": 1,
"page": 1,
"pageSize": 1,
"totalPages": 1,
"hasNextPage": true,
"hasPreviousPage": true
}
}.png)