Filter parameters to help you filter the user data retrieved via our User API.
The 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 ) |
|
1// Only members of the given group ID2groups eq "604fab5e830203614e6fa59d"34// Only members part of the given space ID5staffbase.space eq "5fc7743d3dd910548d350a2a"67// Only registered admin users8staffbase.status eq "activated" and staffbase.role eq "admin"910// Only users created via CSV import or SSO11staffbase.creationType eq "csv" or staffbase.creationType eq "sso"1213// Custom profile fields (use the profile field ID for data import)14profile.{fieldID} eq "value"1516// -------------------- //17// Different User Types //18// -------------------- //1920// Only users with primary email or username and Staffbase password21(emails pr or userName pr) and password pr2223// Only access code users (no primary email and username)24(not (emails pr) and not (userName pr) and password pr)2526// Only SSO users (identifier, but no Staffbase password)27(externalId pr and not (password pr))2829// ---------------------- //30// Filter for Date & Time //31// ---------------------- //3233// All users that were created since day = 2021-01-01, time = 10:0034created gt "2021-01-01T10:00"3536// All users that were created before day = 2022-01-0137created lt "2022-01-01"3839// All users that were updated since day = 2021-07-07, time = 10:0040updated gt "2021-07-07T10:00"4142// All users that were updated before day = 2021-05-2443updated lt "2021-05-24"4445// All users that were deactivated since day = 2021-07-07, time = 10:0046deactivated gt "2021-07-07T10:00"4748// All users that were deactivated before day = 2021-05-2449deactivated 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)