List all users

Retrieve paginated list of users with search, sort, and filter capabilities

Query Parameters
  • page
    Type: integer
    min:  
    1

    Page number (1-indexed, default: 1)

  • limit
    Type: integer
    min:  
    1
    max:  
    100

    Items per page (max: 100; default varies by endpoint)

  • search
    Type: string

    Search term to filter by email, firstName, or lastName

  • sort
    Type: string

    Sort field and direction (e.g., "createdAt:desc", "name:asc"). Supports comma-separated values for multi-column sorting.

  • entityId
    Type: stringFormat: uuid

    Filter users by entity ID

  • excludeResourceGroupId
    Type: stringFormat: uuid

    Exclude users from specified resource group (filter for "add to group" dialogs)

  • inviteStatus
    Type: array string[]enum

    Filter by invite/activation status. Supports multiple values (repeated params). Example: ?inviteStatus=pending&inviteStatus=expired

    values
    • activated
    • pending
    • expired
  • deletedFilter
    Type: stringenum

    Filter for deleted users visibility:

    • exclude (default): Only show active users
    • include: Show both active and deleted users
    • only: Show only deleted users
    values
    • exclude
    • include
    • only
  • resourceGroupId
    Type: array string[]

    Filter by resource group IDs. Supports multiple values (repeated params). Use '0' to include users with no resource groups assigned. Example: ?resourceGroupId=abc-123&resourceGroupId=0 (users in group abc-123 OR users with no groups)

  • roleId
    Type: array string[]

    Filter by role IDs. Supports multiple values (repeated params). Use '0' to include users with no roles assigned. Example: ?roleId=abc-123&roleId=0 (users with role abc-123 OR users with no roles)

  • noResourceGroup
    Type: boolean

    Filter for users with no resource groups assigned. Shorthand for resourceGroupId=0.

  • noRole
    Type: boolean

    Filter for users with no roles assigned. Shorthand for roleId=0.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/users
curl 'https://api.gpcn.com/v1/users?page=1&limit=1&search=&sort=createdAt%3Adesc&entityId=&excludeResourceGroupId=&inviteStatus=activated&deletedFilter=exclude&resourceGroupId=&roleId=&noResourceGroup=true&noRole=true' \
  --header 'X-API-Key: YOUR_SECRET_TOKEN'
{
  "success": true,
  "message": "",
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "email": "john.doe@example.com",
      "firstName": "John",
      "lastName": "Doe",
      "createdAt": "2026-01-10T09:00:00.000Z",
      "updatedAt": "2026-01-20T14:30:00.000Z",
      "deletedAt": null,
      "lastLoginAt": "2026-01-20T08:15:00.000Z",
      "resourceGroups": [
        {
          "id": "880e8400-e29b-41d4-a716-446655440001",
          "name": "Engineering"
        },
        {
          "id": "880e8400-e29b-41d4-a716-446655440002",
          "name": "DevOps"
        }
      ],
      "roles": [
        {
          "id": "770e8400-e29b-41d4-a716-446655440002",
          "name": "tenant-admin",
          "displayName": "Tenant Admin",
          "resourceGroupId": null,
          "resourceGroupName": null
        },
        {
          "id": "770e8400-e29b-41d4-a716-446655440003",
          "name": "tenant-user",
          "displayName": "Tenant User",
          "resourceGroupId": "880e8400-e29b-41d4-a716-446655440001",
          "resourceGroupName": "Engineering"
        }
      ],
      "inviteStatus": "activated",
      "inviteExpiresAt": null
    }
  ],
  "meta": {
    "total": 1,
    "page": 1,
    "pageSize": 1,
    "totalPages": 1,
    "hasNextPage": true,
    "hasPreviousPage": true
  }
}