Filter parameters to help you filter the user data retrieved via our User API.
/api/users
GET endpointThe GET endpoint /api/users to retrieve users provides a filter
parameter that supports filtering using the SCIM notation.
Property | Filter operator | Allowed values |
---|---|---|
groups | is member (eq )not member ( ne ) | {groupID} |
staffbase.creationType | equal to (eq ) |
|
staffbase.role User Role Type | equal to (eq ) |
|
staffbase.space | is member (eq ) | {spaceID} |
staffbase.status | equal to (eq ) |
|
created The point in time when the user was created in the platform. | gt , ge , le , lt , eq , ne | The value for the point in time is dynamic. Examples:
|
updated The point in time when the user was last updated. | gt , ge , le , lt , eq , ne | The value for the point in time is dynamic. Examples:
|
deactivated The point in time when the user was deactivated in the platform. | gt , ge , le , lt , eq , ne | The value for the point in time is dynamic. Examples:
|
User type | present (pr ) |
|
// Only members of the given group IDgroups eq "604fab5e830203614e6fa59d"
// Only members part of the given space IDstaffbase.space eq "5fc7743d3dd910548d350a2a"
// Only registered admin usersstaffbase.status eq "activated" and staffbase.role eq "admin"
// Only users created via CSV import or SSOstaffbase.creationType eq "csv" or staffbase.creationType eq "sso"
// Custom profile fields (use the profile field ID for data import)profile.{fieldID} eq "value"
// -------------------- //// Different User Types //// -------------------- //
// Only users with primary email or username and Staffbase password(emails pr or userName pr) and password pr
// Only access code users (no primary email and username)(not (emails pr) and not (userName pr) and password pr)
// Only SSO users (identifier, but no Staffbase password)(externalId pr and not (password pr))
// ---------------------- //// Filter for Date & Time //// ---------------------- //
// All users that were created since day = 2021-01-01, time = 10:00created gt "2021-01-01T10:00"
// All users that were created before day = 2022-01-01created lt "2022-01-01"
// All users that were updated since day = 2021-07-07, time = 10:00updated gt "2021-07-07T10:00"
// All users that were updated before day = 2021-05-24updated lt "2021-05-24"
// All users that were deactivated since day = 2021-07-07, time = 10:00deactivated gt "2021-07-07T10:00"
// All users that were deactivated before day = 2021-05-24deactivated lt "2021-05-24"
Since filter
is a URL parameter, whitespaces (space = %20
) and quotes (” = %22
) have to be URL encoded.
Example: only access code users, so no existing primary email and username
https://exampleapp.staffbase.com/api/users?filter=(not%20(emails%20pr)%20and%20not%20(userName%20pr)%20and%20password%20pr)