Search all the users (Paginated and w/ Filter)

GET /users/search

Operation id: UserService_SearchUsers

Description

Permission Level: Read

Tags: UserService

Parameters

Query parameters

NameTypeRequiredDescription
excludeTenantIdsarrayNoList of tenant IDs to exclude. Required: false
fieldMaskstringNoFieldMask to control what fields are to be returned, if empty assumes everything, Required: false Valid path names are names of each field in the SearchUserResponse proto
genericFilterstringNoGeneric filter for user fields (userId, userFirstName, userLastName, email, location, workspace) If it contains a whitespace, it splits the text and filter by both words, Required: false
pageSizeinteger (int32)NoRequested size of the next page of data. If not set, the default page size is 10, Required: false.
pageTokenstringNoMongoDB Field, describes the encoded page token for page traversal, Required: false
roleIdstringNorole id. restrict results to users within this role, Required: false
scopestringNoscope of the users to list, Required: false
sortFieldarrayNoList of sort fields, valid values: userId, firstName, lastName, email, batchId, or lastUpdated Default: userId, Required: false
sortTypestringNoSort Type for the results, Default: ASC, Required: false
specificFilter.emailstringNo
specificFilter.firstNamestringNo
specificFilter.lastNamestringNo
specificFilter.licenseDomainstringNoThe domain of the license
specificFilter.locationstringNo
specificFilter.selectedDepartmentsarrayNoThe selected departments of the user
specificFilter.userIdstringNo
specificFilter.workspaceNamestringNoThe workspace name of the Workspace entity
specificFilter.workspaceTypestringNoThe workspace type of the Workspace entity
specificFilterQueryTypestringNoENUM to switch the specific_filter.first_name and specific_filter.last_name params from AND to OR, Default: AND, Required: false.
tenantIdsarrayNoList of Tenants of the users, Required: false
userStatusstringNoUser status in the selected scope
workspacestringNousers workspace, Required: false

Security

  • Authorization (apiKey)
    • Bearer token

Responses

200 — A successful response.

Content type: application/json

default — An unexpected error response.

Content type: application/json

Response models

200 — A successful response.

Content type: application/json

Schema

PropertyTypeRequiredDescription
usersarrayNo
nextPageTokenstringNo
{
  "type": "object",
  "properties": {
    "users": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "roles": {
            "type": "array",
            "description": "The user's roles. Includes nested roles. Flat list. Read only.",
            "items": {
              "type": "object"
            }
          },
          "workspaces": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "location": {
            "type": "string"
          },
          "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."
          },
          "primarySite": {
            "type": "string"
          },
          "selectedDepartments": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "middleName": {
            "type": "string"
          },
          "platformId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "licenses": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "attributes": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "creationTime": {
            "type": "string",
            "format": "date-time"
          },
          "siteMapping": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      }
    },
    "nextPageToken": {
      "type": "string"
    }
  }
}

default — An unexpected error response.

Content type: application/json

Schema

PropertyTypeRequiredDescription
codeinteger (int32)No
messagestringNo
detailsarrayNo
{
  "type": "object",
  "properties": {
    "code": {
      "type": "integer",
      "format": "int32"
    },
    "message": {
      "type": "string"
    },
    "details": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "@type": {
            "type": "string"
          }
        }
      }
    }
  }
}