List all the users with multiple filters
POST /users/search
Operation id: UserService_ListUsersWithFilters
Description
Permission Level: Read
Tags: UserService
Security
- Authorization (apiKey)
- Bearer token
Responses
200 — A successful response.
Content type: application/json
default — An unexpected error response.
Content type: application/json
Request body
Required: Yes
application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
pageSize | integer (int32) | No | Requested size of the next page of data. If not set, the default page size is 10, Required: false. |
pageToken | string | No | |
tenantIds | array | No | |
scope | string | No | |
genericFilter | string | No | |
specificSearchFilter | object | No | |
sortField | string | No | |
sortType | string | No | |
domain | string | No | |
roleId | string | No | |
fieldMask | string | No | |
includeDisabled | boolean | No | |
exclusionFilters | array | No | |
statusInScope | string | No | - ENABLED: gets only enabled users - DISABLED: gets only disabled users - ALL: gets all users |
startsWithSingleCharacter | boolean | No | |
specificFilterQueryType | string | No |
{
"type": "object",
"properties": {
"pageSize": {
"type": "integer",
"format": "int32",
"description": "Requested size of the next page of data.\nIf not set, the default page size is 10, Required: false."
},
"pageToken": {
"type": "string"
},
"tenantIds": {
"type": "array",
"items": {
"type": "string"
}
},
"scope": {
"type": "string"
},
"genericFilter": {
"type": "string"
},
"specificSearchFilter": {
"type": "object",
"properties": {
"userId": {
"type": "string"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"email": {
"type": "string"
},
"location": {
"type": "string"
},
"workspaceType": {
"type": "string"
},
"workspaceName": {
"type": "string"
},
"userAttributes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"scope": {
"type": "string"
},
"fieldName": {
"type": "string"
},
"value": {
"type": "string"
},
"domain": {
"type": "string"
}
}
}
},
"licenseDomain": {
"type": "string"
},
"sites": {
"type": "array",
"items": {
"type": "object",
"properties": {
"tenantId": {
"type": "string"
},
"siteName": {
"type": "string"
}
}
}
},
"platformId": {
"type": "string"
},
"primarySite": {
"type": "string"
},
"selectedDepartment": {
"type": "string",
"description": "Optional - The Selected Department of the user."
}
}
},
"sortField": {
"type": "string"
},
"sortType": {
"type": "string",
"enum": [
"NONE",
"ASC",
"DESC"
],
"default": "NONE"
},
"domain": {
"type": "string"
},
"roleId": {
"type": "string"
},
"fieldMask": {
"type": "string"
},
"includeDisabled": {
"type": "boolean"
},
"exclusionFilters": {
"type": "array",
"items": {
"type": "object",
"properties": {
"fieldName": {
"type": "string",
"description": "the entity field name. Required: true."
},
"values": {
"type": "array",
"description": "the values that should be excluded. Required: true.",
"items": {
"type": "string"
}
}
}
}
},
"statusInScope": {
"type": "string",
"description": "- ENABLED: gets only enabled users\n - DISABLED: gets only disabled users\n - ALL: gets all users",
"enum": [
"ENABLED",
"DISABLED",
"ALL"
],
"default": "ENABLED"
},
"startsWithSingleCharacter": {
"type": "boolean"
},
"specificFilterQueryType": {
"type": "string",
"enum": [
"AND",
"OR"
],
"default": "AND"
}
}
}
Response models
200 — A successful response.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
users | array | No | |
nextPageToken | string | No |
{
"type": "object",
"properties": {
"users": {
"type": "array",
"items": {
"type": "object",
"properties": {
"userId": {
"type": "string"
},
"tenantId": {
"type": "string"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"email": {
"type": "string"
},
"location": {
"type": "string"
},
"site": {
"type": "string"
},
"departments": {
"type": "string"
},
"attributes": {
"type": "array",
"items": {
"type": "object"
}
},
"workspaces": {
"type": "array",
"items": {
"type": "object"
}
},
"userStatus": {
"type": "string"
},
"creationTime": {
"type": "string",
"format": "date-time"
},
"lastUpdated": {
"type": "string",
"format": "date-time"
},
"batchId": {
"type": "string"
},
"notificationPreferences": {
"type": "array",
"description": "User notification preferences for different subsystems and scopes. If not present for a given subsystem/scope, it is assumed all notifications modes are enabled.",
"items": {
"type": "object"
}
},
"contactNumber": {
"type": "string"
},
"uniqueUserId": {
"type": "string",
"description": "Randomly generated string at the time of creation. Should be used to reference a unique user by other services as user_id may contain PII."
},
"claims": {
"type": "object"
},
"enabledScopes": {
"type": "object",
"description": "Scopes and status (enable, disable) for a user. Scope is optional. Typically applications will always pass their scope, but it is optional for admin purposes."
},
"addresses": {
"type": "array",
"items": {
"type": "object"
}
},
"contactNumbers": {
"type": "array",
"items": {
"type": "object"
}
},
"roles": {
"type": "array",
"description": "The user's roles. Includes nested roles. Flat list. Read only.",
"items": {
"type": "object"
}
},
"defaultLocale": {
"type": "string"
},
"primarySite": {
"type": "string"
},
"selectedDepartments": {
"type": "array",
"items": {
"type": "string"
}
},
"licenses": {
"type": "array",
"items": {
"type": "object"
}
},
"middleName": {
"type": "string",
"description": "Middle name of the user."
},
"preferredName": {
"type": "string",
"description": "Preferred Name of the user."
},
"isClient": {
"type": "boolean"
},
"assignedRoles": {
"type": "array",
"items": {
"type": "object"
}
},
"inheritedRoles": {
"type": "array",
"items": {
"type": "object"
}
},
"siteMapping": {
"type": "array",
"items": {
"type": "object"
}
},
"primarySelectedDepartments": {
"type": "array",
"description": "The selected departments that the user is assigned to. This is to support UI for getting the details part of the graphQL query.\nIn V3, we can remove the existing selected_departments field and use this one instead.",
"items": {
"type": "object",
"description": "Protobuf created to represent a Department.\nUsing this name because UniqueDepartmentProto is already used for another use case."
}
},
"userStatusLastUpdated": {
"type": "string",
"format": "date-time"
}
}
}
},
"nextPageToken": {
"type": "string"
}
}
}
default — An unexpected error response.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
code | integer (int32) | No | |
message | string | No | |
details | array | No |
{
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
}
}
}
}
}